!------------------------------------------------------------------------ ! E.S.O. - VLT project ! ! "@(#) $Id: help_emmi.prg,v 2.3+ 2003/11/15 01:29:20 vltsccm Exp $" ! ! EMMI quick look context, module nttplemmi ! ! usage: ! EMMI/FLAT ! or ! @@ emmi_fcomb ! ! Purpose: creates a master flat for ! EMMI spectra. ! The flat is limited to Ampl. B ! of the new red CCD, while it is ! full frame for the blue CCD. ! ! Requires: ! inemmi.prg ! input files in .bdf and .tbl format ! ! who when what ! --------- -------- ---------------------------------------------- ! ohainaut 2004-08-04 header and archived, renamed to emmi_fcomb.prg ! epompei 2003-09 First creation !----------------------------------------------------------------------------- ! midas procedure fcombEMMI.prg write/out "***********************************" write/out "* MIDAS PROCEDURE FCOMBEMMI *" write/out "***********************************" ! Creates a flat catalog, edit it ! to leave only the proper files ! convert them in bdf with the inemmi ! script crea/icat flat EMMI*.fits write/out "Edit the catalog and leave just the flat frames" $ emacs flat.cat write/out "These are possible bias values:" write/out "RED: " write/out "normal 2x2 340 " write/out "normal 1x1 271 " write/out "slow 2x2 288 " write/out "slow 1x1 284 " write/out " " write/out "BLUE: " write/out " 1x1 564 " Define/par p1 ? ? "Please choose one bias value" write/out defi/par p2 ? ? "Which mode are you using? (BLUE=0 RED=1)" if {p2} .EQ. 0 then write/out "please edit the catalog, replace .fits" write/out " with .bdf and save as bdf.cat" $ emacs flat.cat indisk/fits flat.cat bdf.cat set/con long prepare/long flat.cat tflat trim=50,275,1075,827 endif if {p2} .EQ. 1 then write/out "please edit the catalog, replace .fits" write/out " with .bdf and save as bdf.cat" $ emacs flat.cat exec/cat @@ inemmi flat.cat crea/icat flat_bdf eR*.bdf write/out "This is the catalog with the *bdf files;" write/out "please be sure to leave only the flat frames" $ emacs flat_bdf.cat $ cp flat_bdf.cat flat_rot.cat write/out "Now edit this output catalog by replacing" write/out "the .bdf with the extension _rot.bdf " $ emacs flat_rot.cat set/con long defi/par p3 ? ? "Which binning you are using? (1 or 2)" if {p3} .EQ. 2 then exec/cat rot/clock flat_bdf.cat flat_rot.cat exec/cat write/descr flat_rot.cat START 1.0,1.0 exec/cat write/descr flat_rot.cat STEP 2.0,2.0 !trimming ottimizzato per il grism 1 !prepare/long flat_rot.cat tflat trim=290,520,2049,1036 !trimming ottimizzato per il grism 2 prepare/long flat_rot.cat tflat trim=365,520,2049,1036 !trimming ottimizzato per il grism 4 !prepare/long flat_rot.cat tflat trim=440,520,2049,1036 !trimming ottimizzato per il grism 7 !prepare/long flat_rot.cat tflat trim=300,520,2049,1036 ! trimming generico !prepare/long flat_rot.cat tflat trim=1,520,2049,1036 endif if {p3} .EQ. 1 then exec/cat rot/clock flat_bdf.cat flat_rot.cat exec/cat write/descr flat_rot.cat START 1.0,1.0 exec/cat write/descr flat_rot.cat STEP 1.0,1.0 prepare/long flat_rot.cat tflat trim=1,1039,4098,2072 endif endif crea/icat flat tflat*.bdf define/local catal/i/1/1 0 cat_loop: store/frame in_a flat.cat 1 finito comp/ima {in_a} = ({in_a}-{p1}) goto cat_loop finito: combine/long flat medflat median !norm/flat medflat masterflat 0 5 cont/spec medflat normflat ? ALL 1. 3 comp/ima masterflat1 = medflat/normflat crea/disp 0 700,700 load/ima masterflat1 sc=fu cuts=f,i write/out write/out "This is the flat which will be subtracted from the images"