spacetelescope / drizzlepac

AstroDrizzle for HST images.
https://drizzlepac.readthedocs.io
BSD 3-Clause "New" or "Revised" License
50 stars 39 forks source link

updatewcs #901

Closed orifox closed 3 years ago

orifox commented 3 years ago

Hi,

When I don't have updatewcs set, I get an error to set it: ValueError: 'fname' must be a file object opened in 'update' mode.

When I do have upatewcs set, I get the following error: ValueError: Undefined variable iref' in stringiref$2731450pi_idc.fits'

Thanks, Ori

stscijgbot-hstdp commented 3 years ago

This issue is tracked on JIRA as HLA-471.

stsci-hack commented 3 years ago

Hello Ori,

It is not clear from the information in this ticket what code you were trying to run that called updatewcs or how you were trying to call this code. However, the first error comes from passing in a filename (as a string) instead of opening the file with astropy.io.fits.open() with mode="update". The second error indicates that you do not have the environment variable iref set to point to a local directory where the code can find the reference files specified in the image header, in this case, the distortion model reference file 2731450pi_idc.fits. You can get these reference files using the web service https://hst-crds.stsci.edu/bestrefs/. You can get more details from the WFC3 Data Handbook; specifically, https://hst-docs.stsci.edu/wfc3dhb/chapter-4-wfc3-images-distortion-correction-and-astrodrizzle/4-2-distortion-corrections-and-image-combination.

Should you continue to struggle to run this code, please contact 'help@stsci.edu' with more details about what code you were running and how you were trying to call this code.

Cheers, Warren

stscijgbot-hstdp commented 1 year ago

Comment by Warren Hack on JIRA:

Provided user with information to resolve their problem on 17-Dec-2020.  No subsequent response by user, so assuming issue was resolved.