-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flats.py fails to handle lamps off flats correctly #137
Comments
Hi @joshwalawender has there been any updates on this? We've been reducing some K band data and the combined flats comes out as 0 because of this issue. |
@themiyan would you be available to work with us on this? unfortunately, we have very little bandwidth to work on MOSFIRE pipeline right now. Does this work? |
@themiyan @lucarizzi Sorry for being slow on the response to this. When I originally logged this, I tried to work out the code path and as far as I can tell, it is not fully implemented. I don't think handling of lamps off flats was ever completed, so it would require developing the rest of that code path. |
I think this part was worked on by Marc Kassis a while back- could the code have gotten lost in the github repository and possibly
not carried forward? I seem to recall a time when this DID work...
… On Apr 16, 2019, at 2:12 PM, Josh Walawender ***@***.***> wrote:
@themiyan @lucarizzi Sorry for being slow on the response to this. When I originally logged this, I tried to work out the code path and as far as I can tell, it is not fully implemented. I don't think handling of lamps off flats was ever completed, so it would require developing the rest of that code path.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
The previous version of the pipeline is still here, in a repository called https://github.com/Keck-DataReductionPipelines/MosfireDRP_preWMKO so we can check. |
I agree with @csteidel I do recall it used to work at some point in the past. @lucarizzi I'll have a look at this. |
Is it possible that it was just a typo in Flats.py? see commit 4669b84 I tried on a data set and it correctly calculates the on and off flats and subtracts them. |
yes, that seems to do the trick. Sorry i didn't get a chance to look into this.
|
I think that make_pixel_flat() uses whatever flat you save on disk. But yes I don't think that we are actually using the on minus off flat to feed make_pixel_flat. |
The
handle_flats
method inFlats.py
does not appear to handle lamps off flats correctly.First, looking at the code, the file which contains the combined lamps off data is actually formed from the lamps on data. Line 132 reads"
IO.imcombine(flatlist, out, options, reject="minmax", nlow=1, nhigh=1)
but it should presumably be:
IO.imcombine(lampOffList, out, options, reject="minmax", nlow=1, nhigh=1)
As a result of this, the difference file between the lamps on and lamps off data is all zeros (i.e.
combflat_lamps_on_2d_K.fits
).Even if this were fixed and the correct data was present in
combflat_lamps_on_2d_K.fits
, themake_pixel_flat
method which would be called withlampsOff=True
does not use that flag. It does nothing with the lamps off data.The text was updated successfully, but these errors were encountered: