Commit 094936c0 authored by Gonzalez, Miguel's avatar Gonzalez, Miguel
Browse files

Changes to handle D16 calling straight_2d with no datp.z. Extra comments in lamp_reading_unit_test

parent 363d9ab8
......@@ -78,20 +78,14 @@ if (size(win))[0] eq 3 then kz = (size(win))[3]-1 else kz = 0
; Deal with the Hexapod case in Salsa, where the point information is stored as a string chain
if typename(datp.z) eq 'STRING' then mod_datp, datp, 'z', fix(indgen(n_elements(datp.z)) + 1)
tags = tag_names(datp)
idx = where(tags eq 'Z', found)
if found then if typename(datp.z) eq 'STRING' then mod_datp, datp, 'z', fix(indgen(n_elements(datp.z)) + 1)
; Function works only with regular 2thetha !!!
regul = ""
regu = 0
if not keyword_set(inter) then begin
; Regular will fail if an axis value is not numeric (e.g. Hexapod scan in Salsa)
if typename(datp.x) eq 'STRING' or typename(datp.y) eq 'STRING' or typename(datp.z) eq 'STRING' then begin
lamp_journal, 'Non numeric axis (hexapod scan?)'
lamp_journal, 'Convert to numeric axis before calling straight_2d,'
lamp_journal, 'e.g. z1 = indgen(n_elements(z1)).'
lamp_journal, 'Returning input workspace!'
return, win
Sxyz = regular(win, dY=0, dX=deltaX, datp=datp, /GetNewSize)
regul = " regular"
if Sxyz[0] ne (size(win))[1] then begin
;** ********************************************
;** Test reading routines with old and new files
;** Instructions:
;** Start Lamp first,
;** then launch Idl> lamp_reading_unit_test
;** To check just a single instrument, pass it using the inst keyword, e.g.
;** Idl> lamp_reading_unit_test, inst='in16'
;** Results will appear in a pop-up window and will also be
;** written into the working directory, into a file named
;** lamp_reading_unit_test.txt
pro unittest_error_reading, error_mess, test_string, fails_count, failed_tests, user_directory, test_directory, unit
;** ******************************************
......@@ -984,7 +1001,7 @@ pro lamp_reading_unit_test, inst=inst
;** You should start Lamp first,
;** then launch this procedure without parameter or
;** giving an instrument keyword, e.g.
;** lamp_reading_unit_test, inst='in10'
;** lamp_reading_unit_test, inst='in16'
;** See results in the file lamp_reading_unit_test.txt
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment