Blame view

src/idl/dustem_write_qabs.pro 680 Bytes
427f1205   Jean-Michel Glorian   version 4.2 merged
1
2
3
4
5
6
7
8
9
10
PRO dustem_write_qabs,dir,st

;Caution: dir is the directory only
;Filenames are constructed inside the routine

;stop
Qstring='QABS_'
Estring='.DAT'
Nfiles=n_elements(st)
frmt="(50E15.5)"
d06cb418   Ilyes Choubani   Added PILOT filter
11
stop
427f1205   Jean-Michel Glorian   version 4.2 merged
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FOR i=0L,Nfiles-1 DO BEGIN
  filename=dir+Qstring+(*st(i)).material+Estring
  Nsizes=n_elements((*st(i)).sizes)
  OPENW,unit,filename,/get_lun
  printf,unit,Nsizes
  printf,unit,(*st(i)).sizes,format=frmt
  NLines=n_elements((*st(i)).qabs)
  NQabs=n_tags((*st(i)).qabs)
  vars=fltarr(NQabs,Nlines)
  FOR k=0L,NQabs-1 DO BEGIN
    vars(k,*)=((*st(i)).qabs).(k)
  ENDFOR
  FOR j=0L,Nlines-1 DO BEGIN
    printf,unit,vars(*,j),format=frmt
  ENDFOR
  close,unit
  free_lun,unit
ENDFOR

END