-
Notifications
You must be signed in to change notification settings - Fork 1
TARGNAME parsing and database updating #156
Comments
…name of the jpl_object column to planets and moons Ticket #156.
Here's a todo list of the changes we expect are necessary to get the database working for the new inputs:
I've got the alteration of |
One challenge we have is that, in working with But merging I think this is an okay, if somewhat weird, workflow. At the moment, Eventually, I think we'll just merge |
I've added a For example, for Neptune:
|
… new module file_handling.py, which contains functions that are now called by multiple parts of the pipeline. Also modified get_mtarg to get_mtargs, and had it return a list of matched planets and moons. Finally, worked on refactoring database_interface.py. For Ticket #156.
This last one was a big commit. I've moved a lot of functions into a new module, I've also almost finished refactoring In the master images table, we want to store the name of every target, even if its not a planet or moon. This means using the targname header keyword, if necessary. But in the master finders table, we want rows only for planets and moons from |
…to make_all_moon_dict, which has been completely refactored. For Ticket #156.
I've made two big changes in this commit: I've removed I've refactored
Eventually, we should transition to using only |
One of the central difficulties facing the pipeline is the identification of what the targets are in each image. We need to use information from the header keyword
TARGNAME
to find out what object is in the image, after which we use JPL's HORIZONS ephemeris to figure out if anything else is in the image.But parsing the
TARGNAME
keyword is difficult.TARGNAME
could be a HORIZONS-recognized object. But it could contain a HORIZONS object only as a substring. Or it could contain multiple HORIZONS objects. Or it could contain abbreviations of multiple HORIZONS targets.In the
update-master-finders
branch, parsing theTARGNAME
keyword is done in theget_header_info()
function ofbuild_master_finders_table.py
. It solves the issues in the previous paragraph by hardcoding a dictionary which specifies known trickyTARGNAME
values, and maps them to HORIZONS objects. For instance, jupitertest2 maps to jupiter, sat to saturn, gany to ganymede, gan to ganymede, etc.This dictionary only covers WFPC2. If we want to keep this method, we'll need to expand this dictionary to cover all the problematic
TARGNAME
values in the WFC3 and ACS inputs.But when we adopted the MAST naming conventions, we decided to have the target names in the filename as well. I added a function to
imaging_pipeline.py
,get_mtarg
, that solves the problem in a more general way.In my function, if a JPL HORIZONS object is a substring in
TARGNAME
, than that object is added to the target list. So you don't need to manually specify cases like jupitertest2. To deal with cases whereTARGNAME
contains an abbreviation of a HORIZONS object, like jup, I specify an abbreviations dictionary. To deal with cases where one HORIZONS object may be a substring of another HORIZONS object (pan, anthe, io, and titan are all substrings of other objects) I hardcode a dictionary of these problems, and pipeline ignores the shorter string if the longer string is present.I think this functionality should be used when building the ephemeris database as well. We will only need to expand the dictionary of abbreviations in the WFC3 and ACS inputs, whereas with the older method we would need to expand the dictionary for every special case.
Regardless of which method we choose, one thing that definitely needs to be fixed in
get_header_info()
is how we assert thatTARGNAME
does not match a HORIZONS target. At the moment, if 'asteroids' is in the filepath, then we don't bother checking. That won't do for the new inputs, a lot of whose targets aren't HORIZONS objects, but whose filepaths don't contain 'asteroids' .There are other problems in
get_header_info()
, like relying on the presence/acs/
or/wfc3/
in the filepath, that needs to be fixed. In fact,get_header_info()
probably should get a complete refactoring, as I suspect it makes a lot of assumptions about the filenames that are probably no longer valid under the MAST conventions.The text was updated successfully, but these errors were encountered: