question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cleanup uses of prihdr and header in the FITS docs

See original GitHub issue

@MSeifert04 fixed an instance of variable names changing half way through the io.fits docs in one place - however there are other places where this happens, e.g. in the headers.rst file:

https://github.com/astropy/astropy/blame/master/docs/io/fits/usage/headers.rst#L138

Fundamentally the issue is that we are skipping the doctests in all these files, which is bad! We really should fix the examples so they actually run (and with data we can put on data.astropy.org, no excuse really)

I also think header makes more sense than prihdr as a variable name. It would be great to fix this soon since there have been some complaints/confusion.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
MSeifert04commented, Oct 2, 2017

@astrofrog You’re right. I actually opened https://github.com/astropy/pytest-remotedata/issues/5 because that would allow to conditionally run the doctests when remote data is given.

I would actually hate to riddle the code with doctest: +REMOTE_DATA comments.

1reaction
MSeifert04commented, Oct 2, 2017

thanks for the fast reply @drdavella , I’ll have a look at your PR and see how far I can get 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

FITS Headers — Astropy v5.2
A user can use any header and any data to construct a new HDU. astropy will strip any keywords that describe the data...
Read more >
FITS Headers — PyFITS 3.0.13.dev documentation
So, a user can use a table HDU's header to construct an image HDU and vice ... open a FITS file >>> prihdr...
Read more >
New automatic FITS header cleanup feature
0. This version comes with a new cleanup headers feature. The FITS standard allows only printable ASCII characters in header keywords (ISO/IEC ...
Read more >
Interfacing with FITS Files — GalSim 2.4.6 documentation
If the FITS header has keywords that start with GS_ , these will be used to initialize the bounding box and ... The...
Read more >
change keyword value in the header of a FITS file
Or better yet use the with statement: with pyfits.open(filename, mode='update') as hdul: # Make changes to the file... # The changes will be ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found