Skip to content

SPICE metadata object#171

Merged
DanRyanIrish merged 6 commits intosunpy:masterfrom
DanRyanIrish:spice
Jul 24, 2020
Merged

SPICE metadata object#171
DanRyanIrish merged 6 commits intosunpy:masterfrom
DanRyanIrish:spice

Conversation

@DanRyanIrish
Copy link
Copy Markdown
Member

This PR introduces metadata objects that define a standard API for accessing commonly used solar metadata for slit spectrograph instruments. It includes a specific implementation for SolO/SPICE.

@DanRyanIrish
Copy link
Copy Markdown
Member Author

@Cadair, you might be interested in discussing this as I think it has potential implications for sunpy.

@@ -0,0 +1,52 @@
__all__ = ["RemoteSensorMetaABC", "SlitSpectrographMetaABC"]

class RemoteSensorMetaABC():
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should make this an actual ABC and use abstract method on the properties.

pass

@property
def date(self):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

date is probably not a good key, something likeobservation_date or even better date_start date_end would map better to FITS and sanity.

pass

@property
def dsun(self):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

distance_to_sun?

pass

@property
def rsun_obs(self):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just FITS, not sure what's better though.

__all__ = ["SPICEMeta"]


class SPICEMeta(fits.header.Header, SlitSpectrographMetaABC):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure inherting from fits header is wise, it might be better long term to keep the header as an attribute rather than actually this object.

@DanRyanIrish DanRyanIrish force-pushed the spice branch 3 times, most recently from 59758c6 to 73240c5 Compare July 23, 2020 15:18
Remove SPICEMeta inheritance of astropy FITS header.
Rename some metadata property names to be more descriptive.
@DanRyanIrish
Copy link
Copy Markdown
Member Author

@Cadair, does this now provide the features you were looking for?

@DanRyanIrish DanRyanIrish added this to the 0.1.3 milestone Jul 23, 2020
@DanRyanIrish DanRyanIrish force-pushed the spice branch 2 times, most recently from 8894add to dbb64fb Compare July 23, 2020 19:42
@DanRyanIrish DanRyanIrish merged commit 45fd88f into sunpy:master Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants