Closed sumanchapai closed 1 year ago
Hi Suman,
Not really sure here but I know we have had problems with that white strip in the past. I suspect that what you describe is a problem for us no matter how we try to "fix" it and we just need to be smart enough to watch out for edge effects creeping into our light curves.
JW
On Wed, Sep 6, 2023 at 3:09 PM Suman Chapai @.***> wrote:
@wilkerje https://github.com/wilkerje, @minhviet0308 https://github.com/minhviet0308 I noticed that some of the flux values for some masterflats are weird. Weird means negative. And these negative values are being interpreted as very high positive values. The culprit is the following line
In IDL code:
In Python code:
I haven't checked whether it is actually a problem in IDL code as IDL might have some built in mechanism of avoiding negative numbers but it's causing us issues in the python code. Basically, this line is the last step in masterflat generation in which we are subtracting the masterDark data. Apparently, in some cases, some values at the edge happened to have higher flux value in masterdark than in masterflat thus causing these flux values to be negative after subtraction.
For now, I am just going to zero these negative values. Please let me know if you think this will be a problem.
See the thin strip of white. Apparently these values that were negative become very high positive value in the FITS mode thus the entirety of the image looks black as the other values are much lower than this white strip fluxes. [image: image] https://user-images.githubusercontent.com/26862106/266127638-0c78aa8f-841c-4c3c-933e-f0c1eddb726a.png
— Reply to this email directly, view it on GitHub https://github.com/LutherAstrophysics/m23/issues/33, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZNOK3NLJKQWH3OK4YU4C7DXZDJ6PANCNFSM6AAAAAA4N3PQEA . You are receiving this because you were mentioned.Message ID: @.***>
Professor, @wilkerje
Thank you for the information. By way of calibrating raw images, when a masterflat is 0 at a particular location, the ADU value for that location in the calibrated raw image will go to infinity. We'll make those infinities 0 so that it doesn't contribute to any star ADU. Additionally, we are only considering a star as a star if its ADU values in all pixels are above 0.
I hope that this way, we'll avoid obvious problems although I won't be surprised if this causes some unknown issue in the future. But that, I suppose, is Science.
@wilkerje, @minhviet0308 I noticed that some of the flux values for some masterflats are weird. Weird means negative. And these negative values are being interpreted as very high positive values. The culprit is the following line
In IDL code: https://github.com/LutherAstrophysics/idl-files/blob/1957b5ade7de8582b894c609bea0a19b66386486/master_calibration_frame_makerNEWEST.pro#L230C33-L230C33
In Python code: https://github.com/LutherAstrophysics/m23/blob/da6c2dc8a932a270db5b02578d8bd59a2c01925a/src/m23/calibrate/master_calibrate.py#L110
I haven't checked whether it is actually a problem in IDL code as IDL might have some built in mechanism of avoiding negative numbers but it's causing us issues in the python code. Basically, this line is the last step in masterflat generation in which we are subtracting the masterDark data. Apparently, in some cases, some values at the edge happened to have higher flux value in masterdark than in masterflat thus causing these flux values to be negative after subtraction.
For now, I am just going to zero these negative values. Please let me know if you think this will be a problem.
See the thin strip of white. Apparently these values that were negative become very high positive value in the FITS mode thus the entirety of the image looks black as the other values are much lower than this white strip fluxes.