PAHFIT / pahfit

Model Decomposition for Near- to Mid-Infrared Spectroscopy of Astronomical Sources
https://pahfit.readthedocs.io/
18 stars 26 forks source link

SWS Resolution Issue #237

Closed jdtsmith closed 1 year ago

jdtsmith commented 1 year ago
    This might need to be reopened for the ISO resolution. I found this in the SWS handbook

Screen Shot 2022-10-05 at 3 49 50 PM

But the resolution function is giving me this

>>> resolution("iso.sws.speed2.*", [3, 5, 10, 16, 25])
masked_array(
  data=[[1677, --, --],
        [1608, --, --],
        [1570, --, --],
        [1406, --, --],
        [993, --, --]],
  mask=[[False,  True,  True],
        [False,  True,  True],
        [False,  True,  True],
        [False,  True,  True],
        [False,  True,  True]],
  fill_value=999999)

I found this while looking at the included SWS data pahfit/data/ISO_SWS/Orion_D5_ISO-SWS_merged.ipac, and doing a fit. This data is supposedly AOT1 speed 2 (is this the same as SWS01 speed 2?), but the lines seem to narrow.

Figure 2

Manually hacking the resolution to 500 (as stated in the readme for the ISO files) makes the fit much better.

Figure 2(1)

Originally posted by @drvdputt in https://github.com/PAHFIT/pahfit/issues/235#issuecomment-1268903866

jdtsmith commented 1 year ago

@jancami what say you? I don't recall where you got the resolution coefficients for sws, but clearly something isn't right. Is this a speed issue? Not an SWS expert...

jancami commented 1 year ago

@drvdputt @jdtsmith The resolution for speed 1 and speed 2 should be the same and roughly equal to R/7. A speed 3 should be R/4 and speed 4 should be R/3 where R is the full resolution for an AOT 6 scan. I think I may have labeled that speed 0. I'll have a look at this.

jancami commented 1 year ago

Problem identified and resolved. Pull Request #238 should fix this. I have also slightly modified the naming of the segments. JD's test above becomes:

resolution("iso.sws.aot1.speed2.*", [3,5,10,16,25]) masked_array( data=[[471, --, --], [452, --, --], [446, --, --], [410, --, --], [305, --, --]], mask=[[False, True, True], [False, True, True], [False, True, True], [False, True, True], [False, True, True]], fill_value=999999)

which matches the figures a lot better!