Closed ivastar closed 7 years ago
@ivastar Could you, please, provide the version of the drizzlepac that you are using?
Same as for the other issue I reported: AstroDrizzle Version 2.1.8(08-Feb-2017)
@ivastar Also, what instrument are you using and how do you call AstroDrizzle (parameters)?
@mcara WFC3/IR data. These are the parameters I ended up using:
skysub=True (or False) skywidth = 0. skystat = '' skylower = None skyupper = None skyclip = 0. skylsigma = 0. skyusigma = 0. skyuser = 'MDRZSKY' (the name of the keyword does not matter, I've tried naming it other things) skyfile = ''
Astrodrizzle will subtract the background in "MDRZSKY" if subsky is set to True OR to False. I add the background to the FLT before I drizzle to get a correct image and wht map.
I can confirm that skysub
is broken.
I add the background to the FLT before I drizzle to get a correct image and wht map.
This may not be the best workaround. I would suggest that you create a "skyuser" file, e.g., 'skyuser.txt'
with the following content:
filename1.fits 0.0
filename2.fits 0.0
.......
and then call AstroDrizzle like:
>>> drizzlepac.astrodrizzle.AstroDrizzle(..., skysub=False, skyuser='@skyuser.txt')
Another workaround is to delete MDRIZSKY
from image headers and then run AstroDrizzle
like this:
>>> drizzlepac.astrodrizzle.AstroDrizzle(..., skysub=False)
That is, turning off sky subtraction currently works only when MDRIZSKY
is not present in image headers.
A bug fix was created in https://github.com/spacetelescope/drizzlepac/pull/59 but it will take a couple of days before a bug-fix drizzlepac release is made.
Thanks Mihai! These work-arounds are not suitable for me because I still want the sky value to be folded in the WHT map. If I just set it to zero, that will not happen.
These work-arounds are not suitable for me because I still want the sky value to be folded in the WHT map.
Actually, the first workaround above should work if instead of 0.0
for the sky value you enter your best estimate for the sky value for a given input image. It is one of the purposes of skyuser
parameter. Try it.
@ivastar Can you please confirm that latest update fixes the skysub
issue?
I will take a look later. Ugh, now I have to change all my codes! ;)
The following does not actually work:
"However, if the sky subtraction step is turned off, AstroDrizzle will still use the sky value recorded in the MDRIZSKY keyword when performing single-image drizzling and cosmic ray identification, as it provides the only indication of the background sky level needed for the statistical computations used to identify cosmic rays."
The value stored in MDRIZSKY is always subtracted, independent of whether the sky subtraction is turned on or off.