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

modelcube.stellarcont_fit raises an error #795

Open
aashiyashaji opened this issue Mar 22, 2023 · 1 comment
Open

modelcube.stellarcont_fit raises an error #795

aashiyashaji opened this issue Mar 22, 2023 · 1 comment
Assignees
Labels
bug a general bug or other breaking feature

Comments

@aashiyashaji
Copy link

Hello,
I am quite new to Marvin and was trying to obtain the stellar continuum fit from the ModelCube using the following code:

from marvin.tools.modelcube import ModelCube
modelcube = ModelCube(plateifu = '7977-12701', bintype='HYB10')
st = modelcube.stellarcont_fit

which raises the following error:


HTTPError Traceback (most recent call last)
File ~/opt/anaconda3/lib/python3.9/site-packages/brain/api/api.py:201, in BrainInteraction._checkResponse(self, response)
200 try:
--> 201 isbad = response.raise_for_status()
202 except requests.HTTPError as http:

File ~/opt/anaconda3/lib/python3.9/site-packages/requests/models.py:960, in Response.raise_for_status(self)
959 if http_error_msg:
--> 960 raise HTTPError(http_error_msg, response=self)

HTTPError: 422 Client Error: UNPROCESSABLE ENTITY for url: https://dr17.sdss.org/marvin/api/modelcubes/7977-12701/HYB10/MILESHC-MASTARSSP/extensions/stellar/

During handling of the above exception, another exception occurred:

BrainError Traceback (most recent call last)
File ~/opt/anaconda3/lib/python3.9/site-packages/marvin/tools/modelcube.py:389, in ModelCube._get_extension_data(self, name, ext)
388 try:
--> 389 response = self._toolInteraction(
390 url.format(name=self.plateifu,
391 modelcube_extension=model.fits_extension(ext).lower(),
392 bintype=self.bintype.name, template=self.template.name),
393 params=params)
394 except Exception as ee:
...
Validation Errors:
{'validation_errors': {'modelcube_extension': ['Must be one of: flux, ivar, mask, model, emline, emline_base, emline_mask.']}}.
You can submit this error to Marvin GitHub Issues (https://github.com/sdss/marvin/issues/new).
Fill out a subject and some text describing the error that just occurred.
If able, copy and paste the full traceback information into the issue as well.

I tried this for a few galaxies from DR17 and DR15, however, all gave the same error. Any help would be much appreciated!

@havok2063 havok2063 self-assigned this Mar 28, 2023
@havok2063 havok2063 added the bug a general bug or other breaking feature label Mar 28, 2023
@havok2063
Copy link
Collaborator

Hi @aashiyashaji Yes this looks like a real bug. The stellar continuum extension wasn't in earlier releases of the data, but was added later. Looks like the check on valid model cube extensions never got updated. I'll see about pushing a fix. In the meantime, you can still access the stellarcont_fit parameter if you load your model cube locally from a file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a general bug or other breaking feature
Projects
None yet
Development

No branches or pull requests

2 participants