Updated GNIRS reduction script

Home Forums Gemini Data Reduction Updated GNIRS reduction script

This topic contains 11 replies, has 6 voices, and was last updated by  lucyna 1 month, 2 weeks ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1104
    rachelm
    rachelm
    Participant

    Here is the latest version of the XDGNIRS script for reducing GNIRS cross-dispersed data. The tar file contains a manual, but here’s a direct link to it in case you’d like to take a look and see if the code might be useful to you:

    https://dl.dropboxusercontent.com/u/30608926/XDGNIRS_v226.pdf

    XDGNIRS has been fairly well tested on a range of data but it’s the kind of code that astronomers write and I’m afraid I’m not going to be around to support it. Good luck!

    2
    0
    #1344
    achene
    achene
    Keymaster

    NOTE!
    The links to dropbox in the pdf document are broken. Though they link to the same files that are attached to the original post.

    0
    0
    #1517

    klabrie
    Keymaster

    For reference, the original post is at http://drforum.gemini.edu/topic/gnirs-xd-reduction-script/

    0
    0
    #1518

    klabrie
    Keymaster

    Issue:
    Could not import aqutil, please see the online PyRAF FAQ
    http://www.stsci.edu/institute/software_hardware/pyraf/pyraf_faq#5.13

    Limited graphics available (aqutil not loaded)


    This problem occurs at Step 10, and it is related to the display. As stated in the XDGNIRS manual:

    “Most likely things to go wrong: This step is intended to help the Palomar XD group interpret the reduced data and may not work well on other data sets. If this step causes problems, simply run the code with “stop=9” and use your own routines to plot the .txt files output in the previous step. The total counts and FWHM recorded in the data sheet may not be correct for all data sets.”

    Therefore, Gemini recommend that you follow that advice and use your own plotting routines.

    Also, we would like to point out, also from that manual, Section 7:

    “XDGNIRS is not officially supported by Gemini. File a helpdesk request for general questions about GNIRS data and reduction. XDGNIRS-specific questions can be addressed to Rachel Mason, who will attempt to answer on a best-efforts basis, other commitments permitting.”

    This software is essentially a community-supported software, especially now that Rachel Mason has left Gemini, and the field. We recommend that you post your questions here on the DR Forum. Maybe someone in the community has solved this problem already and will be able to help.

    A colleague suggested that it might still be worth asking the question to help@stsci. While they are no longer supporting Ureka, they try to help with those things on a best effort basis. “aqutil” is a pyraf module, therefore belongs to STScI.

    I hope these clarifications help. If you do have a solution, please do post it here!

    0
    0
    #1519
    Bryan Miller
    Bryan Miller
    Moderator

    I’ve had aqutil problems a couple of times. The last time a reboot of the machine fixed it.

    0
    0
    #1526

    Simon Petrus
    Participant

    Hello,

    A few years ago there were several useful examples. I think about
    https://dl.dropboxusercontent.com/u/30608926/example_data.tar.gz
    https://dl.dropboxusercontent.com/u/30608926/example_reduction.tar.gz
    (they are also given in the doc XDGNIRS_v226.pdf in the latest version of XDGNIRS)

    But these links are broken now. Do you know where may I find them?

    Many thanks
    Simon

    0
    0
    #1529
    achene
    achene
    Keymaster

    Dear Simon,

    All these dropbox links (not owned by Gemini) died recently, unfortunately.

    You can access the data with the Gemini Observatory Archive:
    https://archive.gemini.edu/searchform/cols=CTOWEQ/GN-2012A-Q-23/notengineering/GNIRS/20120305/Pass

    The tar ball example_reduction.tar.gz would only have the intermediate files that the script produce. You may recreate them from the example data and the script.

    Hope this works! Please, let us know.

    0
    0
    • This reply was modified 2 months ago by achene achene.
    #1531

    Simon Petrus
    Participant

    Thanks a lot for your answer

    Yes that is correctly working, until the step 10
    I have to use AstroQuery, but it doesn’t find it (see bellow).
    I use Ureka 1.5.2. And yes AstroQuery is not usable with Ureka

    I can find AstroQuery in manual line from consol (with Anaconda) but not with the script of xdgnirs (with xdpiped.csh) which uses Ureka.

    I don’t know what I am suppose to do. Do I have to force the script to use Anaconda (but this doesn’t have Pyraf)? Do I have to install AstroQuery in Ureka? Other?

    Thank you so much for your help
    Best
    Simon

    *************************************
    **      Flux Calibration           **
    *************************************
    ##### identifying the standard star and getting magnitudes ....
    Traceback (most recent call last):
      File "/Users/admin/Desktop/TOOLS/XDGNIRS_V2.2.6//mag2mass.py", line 11, in <module>
        from astroquery.simbad import Simbad
    ImportError: No module named astroquery.simbad
    
    >>>>>>>>>>>XDGNIRS has encountered a problem:
    >>>>>>>>>>>ImportError: No module named astroquery.simbad
    >>>>>>>>>>>Check LISTS/Status_inputfiles.txt
    >>>>>>>>>>>Stopping the script.
    
    0
    0
    #1533

    klabrie
    Keymaster

    Specifically regarding Anaconda and IRAF, I would like to make you aware that IRAF, and Gemini IRAF v1.13.1, have recently been added to the AstroConda channel. Maybe that will help. See the instructions at http://www.gemini.edu/node/12665

    Kathleen

    0
    0
    #1534

    Simon Petrus
    Participant

    Thank you for your answer Kathleen.

    I finally fix my problem with a modification of the GNIRS script. I added a custom line to import modules in anaconda, in the script which needed (mag2mass.py and redshift.py)

    sys.path.append("/Users/admin/anaconda/lib/python2.7/site-packages")

    With that the script is available to find the astroauery module in the modules list of anaconda.

    Simon

    0
    0
    #1535

    klabrie
    Keymaster

    I’m really happy to hear that you found a solution. Thank you for sharing it with the community.

    0
    0
    #1544

    lucyna
    Participant

    Hi,
    I managed to reduce the GNIRS data following the script until nsfransform. So I have wavelength calibrated 2-D spectra. I would like to get rid of hot pixels and cosmic rays now. Andre-Nicolas suggested a few methods. I like crmedian but I found that my output files are not MEF anymore. In result I cannot use nsextract to get 1-D spectra. Am I doing something wrong?
    The command I used is:
    crmedian tel_com[sci,1] output=ctel_com[sci,1]

    I would appreciate any tips for cosmic ray removal.

    Here is the error message:
    nsextract ctel_com[sci,1]
    ——————————————————————————-
    NSEXTRACT — Fri Jun 30 17:29:56 AEST 2017

    FAIL: ctel_com[sci,1] – Extension not readable or absent
    ERROR – NSEXTRACT: Problem with input images (missing or not MEF).

    Cheers,
    Lucyna

    0
    0
Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.