next up previous contents index
Next: Reading/Writing FITS file Up: Cookbook Previous: Typical Analysis Sequence   Contents   Index


Subtracting Baseline on Large Datasets

   1  set verbose off
   2  set level 10
   3  dev im w
   4  greg1\set plot portrait
   5  set format brief
   6  set angle sec
   7  file in co21.30m
   8  find /range -6 6 -6 6
   9  load
  10  plot /index
  11  set window /polygon 1
  12  base 1 /index
  13  plot /index
  14  sic rename window-1.pol my-window-1.pol
  15  sic delete co21-base.30m
  16  file out co21-base.30m new
  17  for i 1 to found
  18    get n
  19    base 1
  20    write
  21  next
  22  file in co21.bas
  23  find
  24  load
  25  plot /index
1.
Makes CLASS quiet.
2.
Turn off nearly all output messages.
3.
Open an image window (necessary to plot 2D images).
4.
Change the orientation to portrait.
5.
Title in short format.
6.
Set arcsecond units.
7.
Open the file.
8.
Build an index according to offsets.
9.
Build a 2D array.
10.
Display the whole index.
11.
Define a polygon interactively to set spectral windows. By default the polygon is stored in a file window-1.pol.
12.
Subtract a 1st order polynom to all records.
13.
Display the result.
14.
Change the polygon filename (to avoid overwritting it next time).
15.
Delete output file if it exists.
16.
Open the output file as new.
17-21
Make a loop over the index to subtract the baseline and write the result.
22-25
Display the result from the output file.


next up previous contents index
Next: Reading/Writing FITS file Up: Cookbook Previous: Typical Analysis Sequence   Contents   Index
Gildas manager 2024-03-28