-
Notifications
You must be signed in to change notification settings - Fork 22
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
Ingest byw #435
Ingest byw #435
Conversation
Line 17 Error: "astropy.io.ascii.core.InconsistentTableError: Number of header columns (9) inconsistent with data columns (7) at data line 0" Header values: ['Source', 'RA', 'Dec', 'Epoch', 'Equinox', 'Shortname', 'Reference', 'Other_ref', 'Comments'] I understand how it's seeing there's missing data under two of the header columns but not sure how to go about debugging for it to recognize that having a missing value is okay. |
I think you should use astropy.io.ascii instead of astropy.Table. It looks like ascii.read does a better job of handling empty cells: |
Line 17 Error Update: How would I find/recognize the correct 'format'? I assumed csv since it's an excel file, but it breaks the code further. |
Here's a video to help you format the link to the Google sheet. You don't need to use pandas, just need to get the URL correct: |
scripts/ingests/ingest_BYW_2024.py
Outdated
data_columns = ['Source', 'RA', 'Dec', 'Epoch', 'Equinox', 'Shortname', 'Reference', 'Other_ref', 'Comments'] # columns with wanted data values | ||
|
||
|
||
def ingest_source(db): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Careful. A function already exists with this name. You imported it from utils. This function should be named something different.
scripts/ingests/ingest_BYW_2024.py
Outdated
ingest_source(db, source = ["CWISE J000021.45-481314.9"], | ||
reference = "Rothermich", | ||
ra = [0.0893808], | ||
dec = [-48.2208077], | ||
epoch = [2015.4041], | ||
equinox = "ICRS") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea to try this! Does it work?
If you can't figure out how to read the Google sheet, just use the CSV file from the issue. |
Since ascii.read attempted to read data from local files rather from URLs, by using a library like 'requests' it helped get data and create an object that can be passed to ascii.read to understand |
Great work! |
Not sure why the json files didnt update when I added the changes, but they didn't show up for me to push new ones |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me. I think we can merge this tomorrow.
@@ -0,0 +1,3 @@ | |||
test | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file shouldn't be part of the ingest. I would just delete the entire file.
Ingesting the sources from Rothermich 2024
Link to relevant issue: Closes # 428
For data ingests:
Update the Versions table