Skip to content
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

lvmdrp failing #78

Closed
kslong opened this issue Apr 24, 2024 · 5 comments
Closed

lvmdrp failing #78

kslong opened this issue Apr 24, 2024 · 5 comments

Comments

@kslong
Copy link
Contributor

kslong commented Apr 24, 2024

For me, the current main branch of lvmdrp is failing, with the following error:

WARNING: FITSFixedWarning: The WCS transformation has more axes (2) than the image it is associated with (0) [astropy.wcs.wcs]
[ERROR]: Traceback (most recent call last):
  File "/Users/long/anaconda3/envs/lvmdrp/bin/drp", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/Users/long/SDSS/lvmdrp/bin/drp", line 276, in <module>
    cli()
  File "/Users/long/anaconda3/envs/lvmdrp/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/Users/long/anaconda3/envs/lvmdrp/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/Users/long/anaconda3/envs/lvmdrp/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/long/anaconda3/envs/lvmdrp/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/long/anaconda3/envs/lvmdrp/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/Users/long/SDSS/lvmdrp/bin/drp", line 174, in quick_reduction
    quick_science_reduction(expnum, use_fiducial_master, skip_sky_subtraction,
  File "/Users/long/SDSS/lvmdrp/python/lvmdrp/functions/run_quickdrp.py", line 189, in quick_science_reduction
    image_tasks.add_astrometry(in_image=dsci_path, out_image=dsci_path, in_agcsci_image=agcsci_path, in_agcskye_image=agcskye_path, in_agcskyw_image=agcskyw_path)
  File "/Users/long/SDSS/lvmdrp/python/lvmdrp/functions/imageMethod.py", line 4072, in add_astrometry
    RAobs_sci, DECobs_sci, PAobs_sci = getobsparam('sci')
  File "/Users/long/SDSS/lvmdrp/python/lvmdrp/functions/imageMethod.py", line 4034, in getobsparam
    copy_guider_keyword(mfheader, 'FRAME0  ', org_img._header)
  File "/Users/long/SDSS/lvmdrp/python/lvmdrp/functions/imageMethod.py", line 4018, in copy_guider_keyword
    imghdr.setHdrValue(f'HIERARCH GDRCOADD {keyword}', gdrhdr[keyword], gdrhdr.comments[keyword])
AttributeError: 'Header' object has no attribute 'setHdrValue'

The guider image does exist, and the keyword it is tryint to obtain also exists.

@kslong
Copy link
Contributor Author

kslong commented Apr 24, 2024

Note that I have tried this on exposure 4416 and 5372

@kslong
Copy link
Contributor Author

kslong commented Apr 24, 2024

The line where the error is occurring is one that we added in Ensenada:

0453f34c python/lvmdrp/functions/imageMethod.py (Niv Drory             2024-04-19 10:52:16 -0700 4018)         imghdr.setHdrValue(f'HIERARCH GDRCOADD {keyword}', gdrhdr[keyword], gdrhdr.comments[keyword])

@ndrory
Copy link
Contributor

ndrory commented Apr 24, 2024 via email

@kslong
Copy link
Contributor Author

kslong commented Apr 25, 2024

@ndrory I was able to process the latest version of the lvmdrp on the bug_guider branch on both of the files that gave the error. From my perspective, this can be merged into main, and this issue closed.

@kslong kslong mentioned this issue Apr 25, 2024
@ajmejia
Copy link
Contributor

ajmejia commented Apr 29, 2024

PR #79 was merged with a fix to this bug.

@ajmejia ajmejia closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants