Skip to content
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

Fixing upper case to lower case descriptors (products) for SOAR 1.11 #94

Merged
merged 7 commits into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ When interacting with the sunpy-soar project you are asked to follow the `SunPy
Installation
------------

**Note**
With the updates to the SOAR, the product names now need to be lowercase.
This is fixed with the latest release of sunpy-soar, so you may need to update if
you are having issues finding data.
nabobalis marked this conversation as resolved.
Show resolved Hide resolved

sunpy-soar requires `python >= 3.7` and `sunpy >= 2.1`.
Currently it can only be installed from PyPI using:

Expand Down Expand Up @@ -48,7 +53,7 @@ The code below gives an example of how to search and download Solar Orbiter data
instrument = a.Instrument('EUI')
time = a.Time('2021-02-01', '2021-02-02')
level = a.Level(1)
product = a.soar.Product('EUI-FSI174-IMAGE')
product = a.soar.Product('eui-fsi174-image')
nabobalis marked this conversation as resolved.
Show resolved Hide resolved

# Do search
result = Fido.search(instrument & time & level & product)
Expand Down
5 changes: 5 additions & 0 deletions sunpy_soar/attrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@
class Product(SimpleAttr):
"""
The data product identifier to search for.
Makes the value passed lower so that it is case insensitive as
all descriptors on the SOAR are now lowercase.
nabobalis marked this conversation as resolved.
Show resolved Hide resolved
"""

def __init__(self, value):
self.value = value.lower()


class Identifier(Product):
"""
Expand Down
Loading