-
-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
list of accepted meta data for custom Maps #1940
Conversation
Ping @Cadair |
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.
As well as the inline comments the keyword and default values should be in double backticks i.e.
``detector``
I think we should also think of something more descriptive than 'meta keyword' I am open to suggestions but maybe 'obtained from meta keyword' as it's more than just a lookup in some cases.
Finally, I think this should be in the Notes
section of the docstring so:
"""
Detector name
Notes
-----
Obtained from meta keyword: ``detector``, default: ``""``.
@@ -601,6 +655,7 @@ def rotation_matrix(self): | |||
""" | |||
Matrix describing the rotation required to align solar North with | |||
the top of the image. | |||
Meta keyword : PC1_1, PC1_2, PC2_1, PC2_2, CD1_1, CD1_2, CD2_1, CD2_2 |
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.
some mention of of PC or CD would be nice here.
"""Heliographic longitude""" | ||
""" | ||
Heliographic longitude | ||
Meta keyword : hgln_obs |
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.
for cases like this where a a not-None default is set it would be nice to have that in the docstring as well.
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.
something like meta keyword: crval1 (default 0 deg), crval2 (default: 0 deg)
"""Heliographic latitude""" | ||
""" | ||
Heliographic latitude | ||
Meta keyword : hglt_obs |
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.
this is not very clear, something like meta keyword: hglt_obs / crlt_obs / solar_b0 [in order of preference]
Also, all the files in |
didn't understand changing sunpy/map/sources part |
@Cadair As far as I can tell, it doesnot change anywhere else in sunpy/map/sources |
@abit2 I mean methods like this: https://github.com/sunpy/sunpy/blob/master/sunpy/map/sources/sdo.py#L51 also need documenting in the same fashion. |
Sweet Jesus that's a lot of pep8 |
@abit2 I think the PR needs a rebase to ignore all the trivial E501s. :) |
@OrkoHunter I thought it pulled the config from the main repo not the PR? Has that changed since the out-of-date version I was playing with? |
@Cadair Earlier it used to pull the config from the main repo's branch. But after testing on different projects, similar to Travis CI, pulling the (updated) config from the PR made more sense. Now I think, there should be a change. If the config is not there in the PR's branch, it should check the main repo. I'd love to hear your suggestions. |
Hello @abit2! Thanks for updating the PR.
|
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 all your work on this @abit2 it's looking really good!
Just a few sphinx formatting changes and stuff.
|
||
* First available: | ||
1. ``ctype1`` | ||
2. ``HPLN-TAN`` |
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.
These are defaults not keys
else with ``CD1_1``, ``CD1_2``, ``CD2_1``, ``CD2_2``. | ||
.. rubric:: Metadata keywords: | ||
|
||
* ``PC1_1`` |
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.
These are generally written as PCi_j
and CDi_j
also these are an either or kinda thing, i.e.
* First Available
1. `PCi_j`
2. `CDi_j`
Returns the solar radius as measured by EIT in arcseconds. | ||
.. rubric:: Metadata keyword: | ||
|
||
* ``solar_r`` |
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.
This is an actual operation on two keywords so we should probably write it as solar_r * cdelt1
to make it clear that's what it is.
dim=u.Quantity(self.dimensions), | ||
scale=u.Quantity(self.scale), | ||
tmf=TIME_FORMAT) + self.data.__repr__()) | ||
obs=self.observatory, inst=self.instrument, det=self.detector, |
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.
This change seems to mis-align these kwargs?
Image observation time | ||
.. rubric:: Metadata keyword: | ||
|
||
* ``date-obs`` Default: ``now`` |
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.
Default 'now'
to indicate it is a string.
wavelength of the observation | ||
.. rubric:: Metadata keyword: | ||
|
||
* ``wavelnth`` Default: 0 |
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.
bacticks
Radius of the sun in meters | ||
.. rubric:: Metadata keyword: | ||
|
||
* ``rsun_ref`` Default: constants.radius |
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.
this can be a full object link
`sunpy.constants.radius`
1. ``rsun_obs`` | ||
2. ``solar_r`` | ||
3. ``radius`` | ||
4. Default: None |
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.
single backticks around None
Carrington longitude (crln_obs) | ||
.. rubric:: Metadata keyword: | ||
|
||
* ``crln_obs`` Default: None |
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.
backticks
@@ -605,6 +721,16 @@ def rotation_matrix(self): | |||
""" | |||
Matrix describing the rotation required to align solar North with | |||
the top of the image. | |||
.. rubric:: Metadata keywords: | |||
|
|||
* ``PC1_1`` |
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.
These are an either or, and also normally written as PCi_j
and CDi_j
to cover all four. i.e it should be a first available with two entries.
@pep8speaks Keep Quiet |
This pull request has been automatically marked as stale because it has not had any activity for the past five months. It will be closed if no further activity occurs. If the ideas in this pull request are still worth implementing, please make sure you open an issue to keep track of that idea! |
This pull request has been automatically closed since there was no activity for a month since it was marked as stale. If the ideas in this pull request are still worth implementing, please make sure you open an issue to keep track of that idea! |
#1832
updated the docstrings of the properties of what meta kwargs they use