Skip to content

Have injector grab fits HDU extension for initial image #44

@sweverett

Description

@sweverett

@mcclearyj found the following error when using image files with the image not in HDU extension 0:

ValueError: WCS does not have longitude type of 'RA', therefore (ra, dec) data can not be returned

While GalSim natively can handle this case with ext : 1, for example, this doesn't currently propagate to injector.py. I believe the fix is simply to add the following to injector.AddOnImageBuilder.buildImage():

try:
    ext = config['wcs']['ext']
except KeyError:
    ext = 0
initial_image = galsim.fits.read(initial_image_name, hdu=ext)

@mcclearyj: Can you confirm that this solved your issue? Thanks!

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions