-
Notifications
You must be signed in to change notification settings - Fork 28
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
get_symbolic_mapping example code doesn't work; how to download rmaps? #1069
Comments
Hello Marshall, first thing I would ask you to check is that your CRDS_SERVER_URL is defined. You can do that with $ echo $CRDS_SERVER_URL or running crds list --status. It should be 'https://jwst-crds.stsci.edu', so if it is not you can set it with $ export CRDS_SERVER_URL=https://jwst-crds.stsci.edu If you had to follow these steps, you can try again and it should work. However it does not, I would suggest running the following command and posting what you get back: $ crds sync -v --files jwst_miri_flat_0012.rmap |
Thanks much. Yes the $CRDS_SERVER_URL is defined and has the expected value. And FYI, running pipeline reductions of science data work as expected; the pipeline automatically retrieves mappings and reference files as needed. However, even though that variable is defined, it doesn't seem like the The CRDS sync command did work to download that one particular file. So that works for cases in which I know the desired filename ahead of time. However that doesn't work for the more general case where I don't know the rmap filename ahead of time. Maybe there is another better way to do the type of search task I'm trying to do, which is to e.g. find a list of all available (current and past) reference files for a given instrument, mode, and reference file type. On the CRDS website this is easy: For example one can select the |
What would likely be helpful for at least checking other files you don't know ahead of time is to run crds sync --all to set your cache. This would ideally handle any file you choose to input for As for your objective, you might try using
If you enter a pmap value, you will get the entire mapping structure back, which could indicate the rmap you need to know. If you already know it, you can run for example
I would imagine you would know the pmap from the date you want to use, pull out the relevant rmap based on the instrument and mode you are using, and then could get all of the references you are looking for. |
Just curious if you have had a chance to try this out Marshall. |
Hi, I'm trying to learn to use
crds
for various queries about reference files, and have ran into a small issue with example code from the docstring. This is quite likely due to some ignorance or missed step on my part, so I'll be grateful for any pointers. Here's what I'm trying, from the docstring:When I try that, I get a FileNotFound error that that rmap is not in my local cache:
The error persists even if I change the hard-coded date in the example code to some more recent date (e.g. after launch and commissioning). It only works if I use a mapping name chosen such that the relevant rmap file is already in my local cache.
What would be the necessary sequence of steps to ask crds to download the past rmap file, if it's not already in the cache?
The task I'm ultimately trying to do is going to involve scripting checks for changes in reference files over time, so being able to say e.g. "what was the active reference file for instrument X, mode Y, on date Z" is exactly what I'd like to be able to do. Thanks in advance for any tips!
The text was updated successfully, but these errors were encountered: