~ubuntu-branches/ubuntu/wily/eso-midas/wily-proposed

« back to all changes in this revision

Viewing changes to stdred/echelle/proc/necsplituves.prg

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
! @(#)necsplituves.prg  19.1 (ESO-IPG) 02/25/03 14:19:43
 
2
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
3
!.COPYRIGHT   (C) 1991 European Southern Observatory
 
4
!.IDENT       necsplituves.prg
 
5
!.AUTHOR      Andrea Modigliani
 
6
!.KEYWORDS    Spectroscopy, Echelle, 
 
7
!.PURPOSE     Split and rotation of UVES spectra
 
8
!.DESCRIPTION
 
9
!  MIDAS procedure to reformat UVES Echelle Spectra Images:!
 
10
!  This procedure:
 
11
!
 
12
!  loads a FITS image
 
13
!  cuts it in two components, one corresponding to each UVES detector side
 
14
!
 
15
!  sets uves context
 
16
!  for each component:
 
17
!
 
18
!   rotates each component clockwise 90 degrees
 
19
!   saves each component on two different assigned names
 
20
!   loads each image
 
21
!   inits echelle package
 
22
!   applies to each image the hough transformation
 
23
!   loads echelle
 
24
!   saves it on an assigned name
 
25
!   save the defined order on an assigned filename
 
26
!   applies the wavelength calibration
 
27
!
 
28
!
 
29
!.VERSION     1.0    Creation    05.10.98
 
30
!-------------------------------------------------------
 
31
!
 
32
DEFINE/PARAMETER  p1 ?  c "Set the FITS image name whithout fits extension (ima.fits=> ima): "
 
33
 
 
34
DEFINE/PARAMETER  p2 {P1} c  "Set the BDF  image root name " 
 
35
DEFINE/PARAM      p3 NO      c  "Display option"
 
36
 
 
37
DEFINE/LOCAL half_x_size/D/1/1 0.
 
38
 
 
39
INTAPE/FITS 1 {p2} {p1}.fits
 
40
if p3(1:1) .eq. "Y"  @ creifnot 2 heat
 
41
 
 
42
if p3(1:1) .eq. "y" LOAD/IMAGE    {p2}0001.bdf scale=-10,-10
 
43
 
 
44
half_x_size = {{p1}0001.bdf,NPIX(1)} / 2
 
45
 
 
46
!first image part
 
47
EXTRACT/IMAGE {p2}_low.bdf = {p2}0001.bdf [{half_x_size}+1,<:>,>]
 
48
if p3(1:1) .eq. "y" LOAD/IMAGE    {p2}_low.bdf scale=-10,-10
 
49
ROTATE/CLOCK {p2}_low.bdf {p2}_low_r.bdf
 
50
FLIP/IMAGE {p2}_low_r.bdf X
 
51
WRITE/DESCRIPTOR {p2}_low_r.bdf start/D/1/2, 1,1
 
52
WRITE/DESCRIPTOR {p2}_low_r.bdf step/D/1/2, 1,1
 
53
 
 
54
!second image part
 
55
EXTRACT/IMAGE {p2}_upp.bdf = {p2}0001.bdf [<,<:{half_x_size},>]
 
56
if p3(1:1) .eq. "y" LOAD/IMAGE    {p2}_upp.bdf scale=-10,-10
 
57
ROTATE/CLOCK {p2}_upp.bdf {p2}_upp_r.bdf
 
58
FLIP/IMAGE {p2}_upp_r.bdf X
 
59
WRITE/DESCRIPTOR {p2}_upp_r.bdf start/D/1/2, 1,1
 
60
WRITE/DESCRIPTOR {p2}_upp_r.bdf step/D/1/2, 1,1
 
61
 
 
62
!comment-out the rest 
 
63
if p3(1:1) .eq. "y" LOAD/IMAGE    {p2}_low_r.bdf scale=-10,-10
 
64
if p3(1:1) .eq. "y" LOAD/IMAGE    {p2}_upp_r.bdf scale=-10,-10
 
65
 
 
66
$rm {p2}_low.bdf {p2}_upp.bdf {p2}0001.bdf
 
67
 
 
68
 
 
69
 
 
70
 
 
71
 
 
72
 
 
73
 
 
74
 
 
75
 
 
76
 
 
77