View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

doing photometry on .mef files - quick question

super zach wrote on Nov 26, 2008

Hi all,

I hope this isn't a rookie question but I am wondering how to go about doing photometry on .mef files. I am using daophot for normal fits files, namely the daofind and phot tasks and I would like to do the same thing with .mef files.

My .mef files are stacked images and of course I could run daofind & phot on a single extension but they were stacked in the first place to make faint object visible so this doesn't really help me.

Any ideas please?

Many thanks,
Zach

Mike Fitzpatrick wrote on Nov 26, 2008

The task can only work on single images at a time, whether they're stacked or not, meaning either single FITS images or extensions that you specify. You can use IMCOMBINE to stack images into a single FITS file of the dithered field, or see the FXSPLIT task in the FITSUTIL package for an easy way to split the mef into individual images. Likewise, you could use IMCOPY to extract a single extension, or else just use the extension number when calling daofind.

-Mike

Francisco Valdes wrote on Nov 26, 2008

Two things.

First you can specify an single image in a MEF to task with the syntax filename[X] where X is either the extension index (the order in the file) or the extension name (extension names must not start with a number). This lets you avoid explicitly "splitting" or copying out images. This an IRAF supported feature that applies to any task expecting an image.

The second thing is that often you want to do the same operation on each extension. If a task takes a "list of images" (check the parameter prompt or help page and look for the work list) you can either create an @file or do the expansion on the fly. A key task for expanding an MEF into a list of images (as in the first paragraph) is proto.imextensions. You use imextensions and direct the output to a file to make the @file.


imextensions [meffiles] > mylist.dat
[sometask] @mylist.dat


To do this on-the-fly with a task you can use msccmd, e.g.


mscred> msccmd "phot $input ..." meffiles


A potential difficulty is tasks which generate output filenames based on the input filenames and which don't explicitly do something with the "[X]" part.

I don't have much experience with daofind or phot but both do take a list of images as input but they do things to generate output names which may make it difficult.

So splitting a file will always work but often you can operate on the images in an MEF with @files have the extension syntax and then use imextensions of msccmd to automate the expansions.

I hope this helps.

Yours,
Frank Valdes

super zach wrote on Nov 26, 2008

thanks for your help :o)

Last post on Nov 26, 2008