1
! @(#)rcosmic.prg 19.1 (ES0-DMD) 02/25/03 14:08:59
2
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3
!.IDENTIFICATION: rcosmic.prg
4
!.PURPOSE: MIDAS procedure to remove and delete cosmic ray events
5
! on single CCD exposure.
6
!.USE: FILTER/COSMIC p1 p2 p3 p4 where:
7
! P1: input image containing the cosmic rays,
8
! P2: median filter of the input image
11
!.AUTHOR: P.Magain, M.Remy, Institut d'Astrophysique de Liege
12
!.VERSION: 911121 MP implemented in Portable MIDAS
13
!-------------------------------------------------------------------------------
15
define/param p1 ? IMA "Enter input image:"
16
define/param p2 ? IMA "Enter output image:"
17
define/param p3 ? NUM "Enter SKY,G,RON,NS,RC:"
18
define/param p4 + IMA "Enter mask name for cosmics:"
19
define/param p5 1,1,0.0 N "Enter parameter P3 for FILTER/MEDIAN:"
20
define/param p6 NA C "Enter parameter P4 for FILTER/MEDIAN:"
24
define/local outima/c/1/60 {p2}
25
define/local params/r/1/5 -1,-1,-1,4,2
26
write/keyw params {p3}
27
define/local cosmic/c/1/60 {p4}
29
write/out "Beginning of the median filter"
30
filter/median {in_a} middumma {p5} {p6}
32
write/out "Beginning of the cosmic rays removal"
33
write/keyw history "FILTER/COSMIC "