ginga: Setting inherit_primary_header=True in general.cfg does not work anymore

I have inherit_primary_header = True set in ~/.ginga/general.cfg but it no longer makes AstroImage inherit primary header on load, even though the primary header still displays in Header plugin when you ask for it. What I mean is the following:

from ginga.AstroImage import AstroImage

im = AstroImage()
im.load_file("myimage.fits")
im.get_header()  # No longer has primary header included

This causes a plugin in stginga to misbehave.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (10 by maintainers)

Most upvoted comments

I will probably still need to modify the change log a bit.

I updated the WhatsNew changelog to match the changes.

Yes, seems to work again with your commit to master with existing unmodified plugin. Thanks for the quick fix! I’ll test the dev version a bit more with other things and report back. 🙇‍♀️

Just pushed a change that allows the following as default case:

im = AstroImage()
im.load_file("myimage.fits")
im.get_header(include_primary_header=True)

or

im = AstroImage(inherit_primary_header=True)  # to be deprecated--don't recommend
im.load_file("myimage.fits")
im.get_header()