Ignore:
Timestamp:
Mar 22, 2016 2:24:35 PM (7 years ago)
Author:
srkline
Message:

changes to the writer to put fake VCALC information into a Nexus file so that it can be used as a fake dataset, one with different detector data, instrument configuration, etc. since NICE currently does not populate many fields.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_HDF5_RW_Utils.ipf

    r987 r988  
    830830        String fileName 
    831831 
    832 // the wavelength 
    833 //      Variable lam = V_getWavelength("VCALC")         //doesn't work, the corresponding folder in VCALC has not been defined 
    834         V_writeWavelength(fileName,VCALC_getWavelength()) 
    835          
     832 
     833// the detectors, all 9 + the correct SDD (that accounts for the offset of T/B panels 
     834// the data itself (as INT32) 
    836835// the front SDD (correct units) 
    837836// the middle SDD (correct units) 
    838837// the back SDD (correct units) 
    839          
    840 // the detectors, all 9 + the correct SDD (that accounts for the offset of T/B panels 
    841838        Variable ii,val 
    842839        String detStr 
     
    846843                Redimension/I tmpData 
    847844                tmpData = (tmpData ==   2147483647) ? 0 : tmpData               //the NaN "mask" in the sim data (T/B only)shows up as an ugly integer 
    848  
    849845                V_writeDetectorData(fileName,detStr,tmpData) 
     846                 
    850847                val = VCALC_getTopBottomSDDOffset(detStr)/10 + VCALC_getSDD(detStr)*100         // make sure value is in cm 
    851848                print val 
    852849                V_writeDet_distance(fileName,detStr,val) 
     850                 
     851// x and y pixel sizes for each detector 
     852//Function VCALC_getPixSizeX(type)              // returns the pixel X size, in [cm] 
     853//Function VCALC_getPixSizeY(type) 
     854        V_writeDet_x_pixel_size(fileName,detStr,VCALC_getPixSizeX(detStr)*10)           // data file is expecting mm 
     855        V_writeDet_y_pixel_size(fileName,detStr,VCALC_getPixSizeY(detStr)*10) 
     856         
     857// the calibration data for each detector 
     858//V_writeDetTube_spatialCalib(fname,detStr,inW) 
     859// and for "B" 
     860//V_writeDet_cal_x(fname,detStr,inW) 
     861//V_writeDet_cal_y(fname,detStr,inW) 
     862 
     863// the dead time for each detector 
     864// V_writeDetector_deadtime(fname,detStr,inW) 
     865// TODO: need a new, separate function to write the single deadtime value in/out of "B" 
     866 
    853867        endfor 
    854868         
    855 // the calibration data for each detector 
    856  
    857 // the dead time for each detector 
     869 
     870 
    858871 
    859872//? other detector geometry - lateral separation? 
    860873 
     874// the wavelength 
     875//      Variable lam = V_getWavelength("VCALC")         //doesn't work, the corresponding folder in VCALC has not been defined 
     876        V_writeWavelength(fileName,VCALC_getWavelength()) 
    861877 
    862878// description of the sample 
     
    866882         
    867883// fake the information about the count setup, so I have different numbers to read 
     884// count time = fake 
     885 
     886// monitor count (= imon) 
     887// returns the number of neutrons on the sample 
     888//Function VCALC_getImon() 
    868889 
    869890// ?? anything else that I'd like to see on the catalog - I could change them here to see different values 
Note: See TracChangeset for help on using the changeset viewer.