! Open a new CLASS file file out classdemo.30m single /overwrite ! Create several CLASS observations define integer mynchan let mynchan 128 define real data[mynchan] set variable sections write ! Allow to change the section status let r%head%presec no ! Disable all sections except... set variable general write set variable position write set variable spectro write for ispec 1 to 100 ! Data let data[ichan] sin(2.*pi*ichan/mynchan)**2 model data /xaxis 1.0 0.0 -1.0 V ! General let r%head%gen%num 0 ! Automatic numbering at WRITE time let r%head%gen%ver 0 ! Automatically increased at WRITE time let r%head%gen%teles "MYTELES" let r%head%gen%dobs 0 let r%head%gen%dred 0 let r%head%gen%kind sic%code%kind%spec let r%head%gen%qual 0 let r%head%gen%scan 1 let r%head%gen%subscan 1 let r%head%gen%ut 0.d0 let r%head%gen%st 0.d0 let r%head%gen%az 0. let r%head%gen%el 0. let r%head%gen%tau 0. let r%head%gen%tsys 100. let r%head%gen%time 100. let r%head%gen%parang 0.d0 let r%head%gen%xunit 0 ! Position let r%head%pos%sourc "MYSOURCE" let r%head%pos%system sic%code%coord%equ let r%head%pos%equinox 2000.0 let r%head%pos%proj sic%code%proj%none let r%head%pos%lam pi/2.d0 let r%head%pos%bet pi/2.d0 let r%head%pos%projang 0.d0 let r%head%pos%lamof 0. let r%head%pos%betof 0. ! Spectro let r%head%spe%line "MYLINE" let r%head%spe%restf 123456.d0 let r%head%spe%nchan mynchan let r%head%spe%rchan 1. let r%head%spe%fres 1. let r%head%spe%vres -1. let r%head%spe%voff 0. let r%head%spe%bad -1000. let r%head%spe%image 98765.d0 let r%head%spe%vtype sic%code%velo%obs let r%head%spe%vconv sic%code%conv%rad let r%head%spe%doppler 0.d0 write next ispec