natashabatalha/PandExo

`jdi.run_pandexo` not reading input instrument dictionary

jaymedina opened this issue · 7 comments

image

I'm trying to generate a MIRI LRS trace after just 1 exposure, but it seems like it's running the default parameters, not the instrument dictionary `inst_dict` I'm feeding it.

I proved this by comparing my results when running the default setting of 10 exposures, and compared the 2 arrays. In this cell I took a np.mean() of both arrays for quick comparison.
image

PandeiaOutTrans['2d']['detector'] is a rate in e/s. Therefore if you are inputting the same star, then you would expect that rate to not change. The trace in these simulations (for MIRI LRS) is assumed to be constant across the detector. You won't see any curvature, as with the NIRISS SOSS simulations. Is that what you are after?

@natashabatalha Hi Natasha, yes, I've generated traces for MIRI LRS for ExoCTK's contamination calculator, but we're getting weird results for MIRI, and we are predicting that it's because the default nexp is set to 10 exposures. For MIRI LRS there cannot be more than 1 exposure per group.

image

The plot above is from JWST ETC: I'm getting a little over 0.8 electrons per second for MIRI LRS, but the values in the output pandexo array are in the 10,000s? Are the units different?

image

That nexp is just a place holder. It gets set to 1 in the code:

pandeia_input['configuration']['detector']['nexp'] = 1

Can you send the stellar info? jmag, teff, logg, and feh. The detector 2d image is a bit different than what you are looking at in the ETC. I think what you are looking for from Pandeia is this :

# count rate on the detector in e-/second/pixel
#det = report_dict['2d']['detector']
det = report.signal.rate_plus_bg_list[0]['fp_pix']

exo_dict['star']['mag'] = 8.0               #magnitude of the system
exo_dict['star']['ref_wave'] = 1.25         #For J mag = 1.25, H = 1.6, K =2.22.. etc (all in micron)
exo_dict['star']['temp'] = 4500             #in K
exo_dict['star']['metal'] = 0.0             # as log Fe/H
exo_dict['star']['logg'] = 4.0

@natashabatalha

@natashabatalha since nexp is a place holder, how do I know what parameters in my instrument dictionary inst_dict are being read and applied by justdoit?

@jaymedina I lost track of what the issue was here. Is there something that still needs fixing here?