-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update changelog for #1113 and loader documentation #1152
Conversation
d6d20b3
to
8688830
Compare
8688830
to
9e4e5ba
Compare
9e4e5ba
to
704de20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document how to write out the header.
Note that the above example, calling ``write()`` without specifying | ||
any format, will default to the ``wcs1d-fits`` loader if the `~specutils.Spectrum1D` | ||
has a compatible WCS, and to ``tabular-fits`` otherwise, or if writing | ||
to another than the primary HDU (``hdu=0``) has been selected. | ||
For better control of the file type, the ``format`` parameter should be explicitly passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does header need to be specified? or does it default to using what's in meta?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per default it is using meta['header']
both in tabular-fits
and wcs1d-fits
(in principle it depends on the loader, but those 2 are the only ones that provide a writer at the moment).
With update_header=True
it treats the entire meta
as a dictionary to update the default header from (i.e. pulls in all items that are serialisable and do not conflict with FITS keyword rules).
Just gonna throw some notes in here as we work through some examples.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating this, let's get it in so I can do a release soon. We can always make further clarifications/expand the docs more later if desired.
This was merged before I pushed my responses to this comment, will submit them in another PR. |
I may have misunderstood your comments last time we spoke offline, I thought this was your plan. Apologies if it wasn't! |
I may not have stated a clear plan; I think I mentioned some further updates to docstrings, but not being sure how much of the narrative docs I'd get to work on. Does not matter if they go into this PR or another follow-up though, no problems! |
Following up on #1113 with some clarifications of its changelog that I missed to bring up to date with the last commits.
With the new options I am wondering if they should not rather go into New Features.
This is also attempting to document the reader/writer usage a bit better in the
Spectrum1D
loaders docs.No fix to the general problem that there is no narrative or API documentation for the loaders themselves – the docs so far are focussing a lot on creating custom loaders, which from experience, almost no one is using (since most people needing a specific loader are contributing it to
default_loaders
right away), and which is not in a good shape itself IMO.So the changes here (essentially just the first paragraphs, the rest is just formatting fixes) are trying to point the users more to the builtin help functions.
Another quirk I noticed is the read/write docs everywhere referring to
CCDData
. I suppose because they are directly inherited fromNDIOMixin
, andCCDData
is probably the oldest subclass actually implementing those I/O methods, but I don't see an easy way to fix this.