natashabatalha/PandExo

Make Saturation Warnings more obvious for users

natashabatalha opened this issue · 0 comments

In the python interface, users have to manually check output['warings'] dictionary key to see if they have saturated pixels. Hard saturated pixels need to be more directly obvious. This can be accomplished through:

  • user warnings
  • printouts in verbose=True mode
  • colored pixels in jpi.jwst_1d_spec

In the meantime, users should be in the habit of checking their output. E.g.

exo = jdi.load_exo_dict('LTT-1445 A b')
exo['observation']['sat_level']=80
exo['observation']['sat_unit']='%'
exo['planet']['type']='constant'
exo['planet']['f_unit']='rp^2/r*^2'
output = jdi.run_pandexo(exo, ['NIRSpec Prism'])

Gives the warnings:

>>> output['warning']
{'Group Number Too Low?': 'All good', 
'Group Number Too High?': 'All good', 
'Non linear?': 'All good', 'Saturated?': 
'Full saturation:\n There are 644 pixels saturated at the end of the first group. These pixels cannot be recovered.', 
'% full well high?': 'All good', 
'Num Groups Reset?': 'NGROUPS<2SET TO NGROUPS=2'}

Which shows the user it is saturated.