!! goto calibrate
!! goto plotident
! init/display p5=rgbq
!!set/context long
!! goto hear
!! goto rectify
!! goto extract
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!
!! search and identify lines, then find wavelength solution
!! plot results of search
!!
!!
SEARCH/LONG
!!!!!!!!!!!!!!!!!!!
!!
!! show results of search with PS files, useful for the following
!! line-identification process
!!
PLOT/SEARCH 1d
!!write/out right-button click on graph to exit...
!!get/gcur
copy/graph postscript
$cp postscript.ps idpx.ps
$gv idpx.ps&
plot/search
copy/graph postscript
$cp postscript.ps id2d.ps
$gv id2d.ps&
calibrate:
set/long wlcmtd=guess guess=refsess
!! Compute the dispersion coefficients by fitting a 2-D polynomial
!! to the whole array
write/out about to find lambda-solution
get/gcur
calibrate/long !! if calib/twice does not work, make some exps
!! with calib/long to fine-tune _dcx_
!! calibrate/twice !! much better than calib/long (when it works...)
!! plot results of the wavelength calibration
@@ plodist
!! tolerate lines that deviate by "tol" pixels
!! set/long tol=1
SAVE/LONG current