Code Monkey home page Code Monkey logo

mirage_darks's Introduction

mirage_darks

Create Linearized Dark files for MIRAGE using the Darks from the JWST/NIRCam Cryo-Vacuum Campaigns (ISIM/CV)

Author: Arsh Nadkarni (UArizona)

Source: Bryan Hilbert (STScI)

Process:

  • Get the essential Darks from FENRIR: Copy the required darks from /surtrdata/External/ISIMCV3_unzipped. For example, if you want to get AX Darks, say cp -r /surtrdata/External/ISIMCV3_unzipped/NRCNRCAX*.fits AX/. This will copy the AX Darks from FENRIR to a directory AX on your local machine. Create a directory AX_Darks inside AX to copy only the .fits dark files.

  • Copy .fits Darks to their sub-directories: Use the copy_darks_to_subdirectory.sh code to copy the .fits dark files in AX to a sub-directory AX_Darks which will host all the .fits Dark files. This bash file should be inside the A1 directory. Then, from the command-line: bash copy_darks_to_subdirectory.sh. You will see all required darks in the AX_Darks directory subsequently.

  • Sort the Darks based on the ISIM/CVX performance: Manually sort the acquired dark files based on your ISIM/CVX needs.

  • Convert from Raw to DMS Format: Use convert_to_DMS.py, which calls sci2ssb.py and nircam2ssb.py First, update the glob call in convert_to_DMS.py so that it is pointing to your files (AX_Darks\*.fits). Then from the command-line:python convert_to_DMS.py. You will see all required darks in the AX_DMS_Darks directory subsequently.

  • Tweak the DMS Darks to be in the Level1B format (this will save disk space by removing unnecessary extensions): You can either:

    • A) make convert_to_Level1b.py executable, and then use a separate call for each uncal file: > ./convert_to_Level1b.py your_dark_file_uncal.fits
    • B) update the glob call in run_conversion.py to point to your DMS uncal files (AX_DMS_Darks\*uncal.fits), and run: > python run_conversion.py
      You will see all required darks in the AX_DMS_Darks directory subsequently. Now, move the Level-1B Darks to another directory in AX, say AX_Level1b_Darks using mv *level1b_uncal.fits /AX_Level1b_Darks.
  • Run MIRAGE's dark_prep step on the DMS Darks in order to Linearize: Create a MIRAGE yaml file for each Level1b dark - easiest is probably to use the attached yaml file as a template and update the file name in the 'dark:' field, as well as the value in 'array_name:', which should be 'NRCXX_FULL' where XX is the detector number (e.g. 'A1'). For the A5 and B5 detectors, you may also need to update the filter value to be something in the LW channel. I don't think dark_prep looks at this info, but if you get an error, that's one thing to do to solve it. Update the glob call in create_linearized_darks.py to use your yaml files. E.g yaml_files = sorted(glob('/home/anadkarni/mirage_darks/A1/A1_yaml_files/*.yaml')). Then call create_linearized_darks.py from the command-line: python create_linearized_darks.py. You will see all required Linearized Darks in the mirage_darks directory subsequently. Now, move the Linearized Darks to another directory in AX, say AX_Linearized_Darks using mv *_uncal.fits AX/AX_Linearized_Darks.

  • Finally, put the resulting Linearized Darks into the proper sub-directory in your MIRAGE_DATA location: E.g. /home/anadkarni/JWST_Programs/mirage_reference_files/mirage_data/nircam/darks/linearized/<detector_name>/

The list of Darks to be converted from ISIM/CV3 can be found in: darks_notes_CV3.txt

mirage_darks's People

Contributors

astroarshn2000 avatar

Watchers

 avatar  avatar  avatar

mirage_darks's Issues

List of Darks - CV3_ALONG/A5

These should be accessible from the Fenrir server at: ~/surtrdata/External/ISIMCV3_unzipped/
If they are missing, it could be they are still in the zipped format here: ~/surtrdata/External/ISIMCV3/

  1. NRCNRCALONG-DARK-53510917431_1_485_SE_2015-12-17T10h15m23.fits
  2. NRCNRCALONG-DARK-53511010201_1_485_SE_2015-12-17T11h05m42.fits
  3. NRCNRCALONG-DARK-53520943021_1_485_SE_2015-12-18T10h40m58.fits
  4. NRCNRCALONG-DARK-53521422131_1_485_SE_2015-12-18T15h05m59.fits
  5. NRCNRCALONG-DARK-53531519121_1_485_SE_2015-12-19T15h59m34.fits
  6. NRCNRCALONG-DARK-53541338251_1_485_SE_2015-12-20T14h29m45.fits
  7. NRCNRCALONG-DARK-53542343451_1_485_SE_2015-12-21T00h28m33.fits
  8. NRCNRCALONG-DARK-53550409111_1_485_SE_2015-12-21T07h06m30.fits
  9. NRCNRCALONG-DARK-53550808241_1_485_SE_2015-12-21T11h36m23.fits
  10. NRCNRCALONG-DARK-53551226341_1_485_SE_2015-12-21T13h06m52.fits
  11. NRCNRCALONG-DARK-53551738001_1_485_SE_2015-12-21T18h08m20.fits
  12. NRCNRCALONG-DARK-53560328081_1_485_SE_2015-12-22T03h56m14.fits
  13. NRCNRCALONG-DARK-53560351571_1_485_SE_2015-12-22T04h20m34.fits
  14. NRCNRCALONG-DARK-53560415011_1_485_SE_2015-12-22T04h42m44.fits
  15. NRCNRCALONG-DARK-53560437361_1_485_SE_2015-12-22T07h49m06.fits
  16. NRCNRCALONG-DARK-53560804151_1_485_SE_2015-12-22T11h59m47.fits
  17. NRCNRCALONG-DARK-53561155591_1_485_SE_2015-12-22T14h23m28.fits
  18. NRCNRCALONG-DARK-53561641091_1_485_SE_2015-12-22T17h20m37.fits
  19. NRCNRCALONG-DARK-53562311041_1_485_SE_2015-12-22T23h54m20.fits
  20. NRCNRCALONG-DARK-53562311041_1_485_SE_2015-12-23T01h42m19.fits
  21. NRCNRCALONG-DARK-60020011461_1_485_SE_2016-01-02T02h29m40.fits
  22. NRCNRCALONG-DARK-60020545311_1_485_SE_2016-01-02T07h09m10.fits
  23. NRCNRCALONG-DARK-60081050261_1_485_SE_2016-01-08T11h47m53.fits
  24. NRCNRCALONG-DARK-60081524241_1_485_SE_2016-01-08T17h03m29.fits
  25. NRCNRCALONG-DARK-60082329041_1_485_SE_2016-01-09T00h04m16.fits
  26. NRCNRCALONG-DARK-60090344021_1_485_SE_2016-01-09T04h16m42.fits
  27. NRCNRCALONG-DARK-60090746381_1_485_SE_2016-01-09T08h21m48.fits
  28. NRCNRCALONG-DARK-60091140151_1_485_SE_2016-01-09T14h23m49.fits
  29. NRCNRCALONG-DARK-60091611271_1_485_SE_2016-01-09T17h16m35.fits
  30. NRCNRCALONG-DARK-60200857491_1_485_SE_2016-01-20T11h19m16.fits
  31. NRCNRCALONG-DARK-60201458561_1_485_SE_2016-01-20T15h29m07.fits
  32. NRCNRCALONG-DARK-60221036191_1_485_SE_2016-01-22T11h43m24.fits
  33. NRCNRCALONG-DARK-60260722581_1_485_SE_2016-01-26T08h04m32.fits
  34. NRCNRCALONG-DARK-60261145131_1_485_SE_2016-01-26T12h12m51.fits
  35. NRCNRCALONG-DARK-60270008251_1_485_SE_2016-01-27T01h00m17.fits

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.