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

Cannot create grid.csv file #7

Closed
jcarrick1 opened this issue Feb 12, 2020 · 4 comments
Closed

Cannot create grid.csv file #7

jcarrick1 opened this issue Feb 12, 2020 · 4 comments

Comments

@jcarrick1
Copy link

Hi, I have installed spexxy and all its dependencies, but I am having a problem with spexxytools as I can't seem to produce any grid.csv output. Testing out the program, the code seems to run (using the commands from the documentation: spexxytools grid create test_spexxy_fits, where test_spexxy_fits contains a FITS file) and produces no error, but I get no output. Is this a known problem? Apologies if I am missing something. I have tried it with several different FITS formats (the spexxy example in tests/testdata/specta/, an example from ULySS, and another from my own simulations) and get the same result for each.

I am hoping to use spexxy as a python alternative to ULySS, as a way to get stellar parameters from spectra, so any further advice on how to achieve this would be greatly appreciated.

Many thanks.

@thusser
Copy link
Owner

thusser commented Feb 13, 2020

Did you specify a regular expression for the extraction of the parameters via --from-filename?
You can also create the file manually. It just needs to be a CSV file with Filename column and one column per parameter in the grid, like in the example:

Filename,Teff,logg,FeH,Alpha
PHOENIX-ACES-AGSS-COND-2011/Z+0.5.Alpha=+0.50/lte02300-0.00+0.5.Alpha=+0.50.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits,2300.0,0.0,0.5,0.5
PHOENIX-ACES-AGSS-COND-2011/Z+0.5.Alpha=+0.50/lte02300-0.50+0.5.Alpha=+0.50.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits,2300.0,0.5,0.5,0.5

@jcarrick1
Copy link
Author

Ok, it seems I misunderstood the functionality. Doing what you suggested and creating a CSV file manually got me past that initial problem. I think I understand how it works now, I’ve been testing different approaches for different files- Are there any specific guidelines on the format of the FITS files? e.g. what metadata should there be in headers, etc.? Apologies, I know this isn't particularly relevant to the original issue.

Thanks for your help.

@thusser
Copy link
Owner

thusser commented Feb 14, 2020

No, sorry, no guidelines at the moment. But if there are CRVAL1/CDELT1 keywords in the header, it should be fine. You can simply try to plot a spectrum via "spexxytools plot" to see whether spexxy can read it.

@jcarrick1
Copy link
Author

Ah ok, that's good to know. I noticed that not having CRVAL1 was a problem.

Cheers, will close now.

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

No branches or pull requests

2 participants