View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Gemini niri task nprepare

rsamra wrote on Nov 06, 2009

Hi I'm trying to run NPREPARE on raw NIRI data however I get many error messages depending on the parameters set.

If I input one file under the command inimages = someimage.fits[1]

I an error saying processing 0 files, despite I've clearly inputted a file. If I do not have the extension .fits[1] I get an an output:

Processing 1 files
WARNING - NPREPARE: Bad pixel mask is either an empty string or contains spaces. Only saturated pixels will be flagged in the DQ frame.

n input file --> output file
filter focal plane input BPM RON gain sat

After this the computer just hangs with a flashing cursor.

Also in the NIRI cookbook it says ignore the very first frame in each sequence, what is the reasoning behind that. Additionally when I epar nprepare and use input files containing a list of file names I get an error saying the number of input does not equal the number of output images despite clearly there being an equal number of input and output files....

Any help on this would be greatly appreciated.

emma wrote on Nov 06, 2009

Hello rsamra,

The nprepare task (and all the tasks in the Gemini package) expect MEF files as the input, since all data obtained using the Gemini telescopes are MEF files. Therefore, you do not need to specify which extension you want to use in the input list for the task. This is why nprepare was failing when you used inimages = someimage.fits[1].

If nprepare is hanging at that particular point, I would be concerned that your Gemini package was not compiled correctly. How did you install the Gemini package? What OS are you using?

The reason why the NIRI cookbook says to ignore the first frame in each sequence is because of the way the data is taken. The following is taken from the NIRI webpages (see also http://www.gemini.edu/sciops/instruments/niri/data-format-and-reduction/warnings for more info about NIRI data)

"The first frame problem arises because the NIRI array is not continuously reset when idle. The result is that when starting exposures after a change in program, target, or offset sequence, the background or dark current level is different, probably due to image persistence after saturating the array (NIRI has no shutter). In practice, this means that the first exposure of each new sequence will show poor background subtraction and should be rejected."

With regards to your "number of input does not equal the number of output images" error, make sure you are *not* specifying an extension in your lists.

Many thanks,

Emma :)

P.S. Gemini also has a helpdesk that you can use for Gemini specific queries (http://www.gemini.edu/sciops/helpdesk/?q=sciops/helpdesk).

rsamra wrote on Nov 06, 2009

So I tried this by leaving the extension out when running nprepare but it still hangs and produces three files. I'm not sure what these files are for they have strange names like tmpvar9286f.fits, tmpinimage9286h.fits and tmpdq9286g.fits the fits header is very different in them too. However only these three files are created when I run nprepare and the computer just sits around idling then.

I did contact gemini but they weren't very helpful at the first response.

Any suggestions?

:(

emma wrote on Nov 06, 2009

Hello rsamra,

I will need the answers to my previous questions to help you further. How did you install the Gemini package? Is it installed on your own personal machine or are you accessing Gemini and IRAF via a server? What OS are you using? A possible reason as to why nprepare is hanging may be because it is trying to access a task that has not been compiled correctly.

Many thanks,

Emma :)

emma wrote on Nov 06, 2009

Another question: what version of the Gemini package and IRAF are you using?

rsamra wrote on Nov 06, 2009

You've been very helpful Emma, but now I think my problem lies with the installation, and on how gemini iraf tasks were compiled.

I have a MAC, running Leopard. The installation seems quite straightforward however I'm running into problems when I have to edit the extern.pkg file I have to add the command:

,gemini$lib/helpdb.mip\

when I add this, I cant login to cl. The only way to edit this is if I'm already in the cl then add the above line to extern.pkg When I comment out ,gemini$lib/helpdb.mip\ I can access the gemini IRAF tasks without the help database. However I can forgo the additional steps in the readme installation which are:

cl> mkpkg -p gemini <arch>
and then
cl> mkpkg -p gemini update >& gemini.spool

considering I've skipped the above steps its probably the reason why its failing to work. However what do type in place of <arch> for an Intel mac running Leopard? The readme says

where <arch> is the architecture (e.g. redhat, ssun, suse, etc.)

but does not tell us about a MAC. I tired replacing <arch> with macintel but I got a bunch of errors.

Any suggestions?

Thanks

emma wrote on Nov 06, 2009

Hello again,

The latest Gemini package (v1.10) from the web site (http://www.gemini.edu/sciops/data-and-results/processing-software?q=node/10882) already contains binaries for Redhat/Fedora, Solaris, and Mac OS X (Intel and PPC) operating systems. So you shouldn't need to run any mkpkg commands for your OS. I am running Leopard on my mac and these pre-built binaries work for me.

Here's what to do when installing the Gemini package:

1) Download the package from the web page above.

2) Unpack the file into the gemini root directory, which should be something like /iraf/extern/gemini/ ... if you already have an /iraf/extern/gemini/ directory, you could just move it to e.g., /iraf/extern/gemini_old and then make a new, empty /iraf/extern/gemini/ directory, where you can unpack the file.

3) Edit the extern.pkg file. Here's what the file should look like:

# External (non core-system) packages.  To install a new package, add the
# two statements to define the package root directory and package task,
# then add the package helpdb to the 'helpdb' list.

reset   extern          = /iraf/extern/ # or where ever your extern directory is

reset   gemini          = extern$gemini/
task    gemini.pkg      = gemini$gemini.cl

# add here the other definitions for all the other packages in your extern folder in a similar manner to the above definition.

reset   helpdb          = "lib$helpdb.mip\
                          ,gemini$lib/helpdb.mip\
# for each definition above, include a line here to define the help file.
                          "
keep


Make sure you add the definition for the help file within the " " and also make sure there is a keep at the end of the file.

4) Go to the directory where your login.cl file is and type "rm -rf uparm/*"
5) Type "cl" to start IRAF
6) Type "gemini" to load the Gemini package
7) Type "niri" to load the niri package
8) Type "help nprepare" to check that the help files are working
9) Try to run your nprepare command

If you follow the above instructions to the letter, the Gemini package should work just fine for you. If this is not the case, please let me know.

Many thanks,

Emma :)

Last post on Nov 06, 2009