;+ ; Contains the get_n2datarecords function ; ; :Author: ; Gaƫlle Boisnard ; ; :History: ; 2006/03/01: Created ; ; 2006/03/01: Last Edit ;- ; ;+ ; Writes the data listed in DATAFILES for the bands indicated in BANDS in a file (FILENAME) and in a ; binary file (FILENAME.b) ; ; :Uses: ; build_directory ; ; :Returns: ; nothing ; ; :Params: ; filename: in, required, type=sometype ; output file name ; datafiles: in, required, type=sometype ; file with list of data ; bands: in, required, type=sometype ; list of bands ;- FUNCTION get_n2datarecords, filename, datafiles, bands stop pos=strpos(filename, '/', /reverse_search) filename1=strmid(filename, 0, pos+1)+'P'+strmid(filename, pos+2, 16) get_n1datarecords, filename1, datafiles, bands read_data_binary, filename1, data1,level='n1' nb=n_elements(data1) for i=0, nb-1 do begin ;read_data_binary, data2, build_directory(data1[i].ydh)+'/n2/P'+,level='n2' printf, unit, data[ind[0]] endfor free_lun, unit ; Writing of the binary data file if (idata ne 0) then begin filebin=filename+'.b' write_data_binary, filebin, data2(0:idata-1) endif end