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:
- Created 6 years ago
- Reactions:2
- Comments:14 (14 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.thanks for the fast reply @drdavella , I’ll have a look at your PR and see how far I can get 😄