DRAGONS Feedback

Home Forums Gemini Data Reduction DRAGONS Feedback


This topic contains 9 replies, has 3 voices, and was last updated by  Kathleen Labrie 2 months, 3 weeks ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #3262

    Kathleen Labrie

    We invite users of DRAGONS to share their comments and suggestions aiming to improve of the documentation and the user experience. While we aim to increase and improve the documentation over time, thanks to your contributions, we will be able to focus first on the immediate needs, on the aspects that are important to you.

    (Note, if you have data reduction issues with DRAGONS, please use the Helpdesk, category Gemini IRAF (since DRAGONS is not on the list yet).)




    Congratulations on the release of DRAGONS. I was able tor reduce my Fast Turnaround data quickly. I reaqly like the command line ability and the python ability to interact with DRAGONS and installing it in its own conda enivronemnt

    I followed on the online tutorial. Since I have a small number of images I was using DRAGONS via the command line. The online examples and what I can find the read-the-docs about the reduce command is that if you have a list of science frames in a file and reduce @list reduce will at the last stage stack the images. I wanted to measure photometry individually. It would be nice if there was a way to have the images reduced one by one but not stacked. I could’t find out how to do that so I ran reduce on each science frame inidivudally on the command line.

    Also I wanted to make list of bias frames by date to process and also only reduce a portion of the science frames. The examples for epxressions that can be used with dataselect. I couldn’t see a way of selecting based on observation date.




    Kathleen Labrie

    Thanks Meg. Great real use cases. This is very helpful to us. It is going to help us update the documentation.

    First the dataselect. The command is:
    dataselect --expr="ut_date=='2017-07-02'" *.fits -o 20170702.lis

    Problem is… there is a bug in dataselect that makes that fail. It’s fixed now. We are looking at a patch release around January-February 2020.

    Second, not doing the stacking. The users can modify any of the recipes even build their own. (There’s documentation on that, but only the most keen user will put the pieces together. We’ll improve that.) Here’s how you could do it.

    Check what the recipe looks like:
    showrecipes N20170614S0201.fits

    Then copy the pre-stack part of that recipe in your local directory, eg. in a file named “myrecipelibrary.py” (or whatever name you like):

       def reduce_nostack(p):

    Then call your personal recipe with:
    reduce @sci.lis -r myrecipelibrary.reduce_nostack

    If you want the cosmic ray rejection, just add the additional steps and remove only the final “p.stackFrames(zero=True)” line.



    Thanks Kathleen. Much appreciated. That all worked for me.

    That’s really handy you can write a reicpe to adjust the default one.

    That would be a great tutorial to add about not doing the stacking with that simple recipe. I’ve tried to read all the documentation, but I’m still on the basics. Your explanation was really clear about how to go about it.



    Another thing that popped up for me is that the archive images are bz2 zipped when you untar the tarball. I often forget to unbzip2 the files. I would go straight into runnig the dataselect commands.

    It would be nice if DRAGONS could deal with that and bunzip them or give a warning saying that the images are bz2-ed and need to be unzipped.



    Kathleen Labrie

    As I have explained in the Helpdesk ticket, that illumination is also present in the IRAF-reduced data if you do not do fringe correction, which is not needed for g-band and r-band. By default, DRAGONS does not correct for fringe when the correction is not needed. When you reduced in IRAF you forced the fringe correction. That’s why the outputs are different. That illumination pattern gets into the fringe frame, so when you subtract it, it take the illumination away. That’s all.

    I do not recommend fringe correction for bands that don’t have fringe pattern. But if you want to make a pretty picture and need the image to be perfectly flat for cosmetic reason, then try to add “-p fringeCorrect:do_fringe=True” when you reduce the g- and r-band. They will look just like IRAF.

    As for the source of the illumination, that I cannot tell. A GMOS instrument scientist would be better positioned to answer. What I do know is that GMOS is plagued with lots of internal scattered light and that that illumination pattern is seen in data taken years after yours even with a different set of CCDs.


    Kathleen Labrie

    Hi Nat,

    Yes, DRAGONS implements the NIRLIN algorithm. The primitive is called “nonlinearityCorrect”. You can see the recipe by using the “showrecipes” command in a terminal. The standard usage is “showrecipes N20200101S0001.fits”.



    Kathleen Labrie

    It is not clear to me why you would need a bulky showd API to get descriptors when scripting.

    Depending on what you need, say to print, you can do:

    for f in filelist:
       ad = astrodata.open(f)

    To get all the filters for the all the files on disk, Chris has this one-liner:

    filters = set([astrodata.open(f).filter_name(pretty=True) for f in glob.glob("*.fits")])

    So depending on what you need, direct access to descriptor through astrodata is probably better than an API to a command line tool.

    As for the logger, you can get access to the logger this way:

    log = logutils.get_logger(__name__)

    Then to write to it:


    stdinfo can be replaced with “fullinfo”, “warning”, or “debug”, that controls what gets to screen and what gets to log. “stdinfo” is as it says standard.


    Kathleen Labrie

    Hi Matthew,

    DRAGONS is not set up to deal with non-sidereal observation in an automated way. Not yet anyway.

    If you do

    showrecipes <filename>

    you will get the path to the recipe currently being used. Copy that file over and edit the “reduce” function to stop just before “adjustWCSToReference”. Then you can work with the outputs to do the alignment and stacking that you need to do.

    The DRAGONS tools that might help you at that point are the primitive “shiftImages” that you can use to feed shift offsets to apply to each frame.

    A colleague suggested another clever solution (clever if it works). You could edit the OBJCAT (a FITS table with an object catalog) such that only Chiron is left in the list, then run “adjustWCSToReference” with “min_sources=1”.

    Give all that a try. If you need further assistance, I recommend that you use the new Helpdesk system (much better than the old one):



Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.