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

IPAC spectra convert #328

Merged
merged 5 commits into from
Feb 10, 2023
Merged

Conversation

jolielheureux
Copy link
Contributor

No description provided.

@jolielheureux
Copy link
Contributor Author

converted data are in issue #308

@kelle
Copy link
Collaborator

kelle commented Dec 9, 2022

Script looks good but some of the filenames are still a little wonky. Eg, BRI and the question mark in 2M1207334.

As we discussed, use the source from the database for the object name and use that (with the spaces removed) for the filename.

scripts/spectra_convert/convert_spectra_to_spec1dfits.py Outdated Show resolved Hide resolved
scripts/spectra_convert/convert_spectra_to_spec1dfits.py Outdated Show resolved Hide resolved
scripts/spectra_convert/convert_ipac_txt.py Outdated Show resolved Hide resolved
scripts/spectra_convert/convert_ipac_txt.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@kelle kelle left a comment

Choose a reason for hiding this comment

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

Looks great! One minor comment about using strip instead of replace.

'telescope': original_header_dict['TELESCOP']['value'],
'instrument': insturment,
'generated_filename':row['source'].replace(' ',''),
'generated_filename':f"{row['source'].replace(' ','')}_{row['reference'].replace(' ','')} " #row['source'].replace(' ',''), #Add reference as a suffix from table
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
'generated_filename':f"{row['source'].replace(' ','')}_{row['reference'].replace(' ','')} " #row['source'].replace(' ',''), #Add reference as a suffix from table
'generated_filename':f"{strip(row['source'])}_{strip(row['reference'])} " # Add reference as a suffix from table

@kelle
Copy link
Collaborator

kelle commented Dec 18, 2022

Please upload the converted files to Issue #308 and I'll upload them to AWS.

@kelle kelle merged commit 7e5b870 into SIMPLE-AstroDB:main Feb 10, 2023
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