Ignore:
Timestamp:
Mar 26, 2019 1:58:56 PM (4 years ago)
Author:
srkline
Message:

more changes to VCALC functionality and bug fixes for VCALC

File:
1 edited

Legend:

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

    r1114 r1134  
    41674167End 
    41684168 
    4169 Function V_writeDet_beam_center_y(fname,detStr,val) 
     4169// fname is a local WORK folder 
     4170Function V_putDet_beam_center_x_pix(fname,detStr,val) 
    41704171        String fname,detStr 
    41714172        Variable val 
    41724173 
    4173 //      String path = "entry:instrument:detector_"+detStr+":beam_center_y" 
    4174          
    4175         Make/O/D/N=1 wTmpWrite 
    4176 //      Make/O/R/N=1 wTmpWrite 
    4177         String groupName = "/entry/instrument/detector_"+detStr  
    4178         String varName = "beam_center_y" 
    4179         wTmpWrite[0] = val 
    4180  
    4181         variable err 
    4182         err = V_WriteWaveToHDF(fname, groupName, varName, wTmpWrite) 
    4183         if(err) 
    4184                 Print "HDF write err = ",err 
    4185         endif 
    4186         // now be sure to kill the data folder to force a re-read of the data next time this file is read in 
    4187 //      err = V_KillNamedDataFolder(fname) 
    4188 //      if(err) 
    4189 //              Print "DataFolder kill err = ",err 
    4190 //      endif 
    4191         return(err) 
    4192 End 
    4193  
    4194  
    4195 // fname is a local WORK folder 
    4196 Function V_putDet_beam_center_y(fname,detStr,val) 
    4197         String fname,detStr 
    4198         Variable val 
    4199  
    4200 //root:Packages:NIST:VSANS:RAW:entry:instrument:detector_FB:beam_center_y 
     4174//root:Packages:NIST:VSANS:RAW:entry:instrument:detector_FB:beam_center_x_pix 
    42014175        String path = "root:Packages:NIST:VSANS:"+fname+":" 
    4202         path += "entry:instrument:detector_"+detStr+":beam_center_y" 
     4176        path += "entry:instrument:detector_"+detStr+":beam_center_x_pix" 
    42034177         
    42044178        Wave/Z w = $path 
     
    42124186End 
    42134187 
     4188Function V_writeDet_beam_center_y(fname,detStr,val) 
     4189        String fname,detStr 
     4190        Variable val 
     4191 
     4192//      String path = "entry:instrument:detector_"+detStr+":beam_center_y" 
     4193         
     4194        Make/O/D/N=1 wTmpWrite 
     4195//      Make/O/R/N=1 wTmpWrite 
     4196        String groupName = "/entry/instrument/detector_"+detStr  
     4197        String varName = "beam_center_y" 
     4198        wTmpWrite[0] = val 
     4199 
     4200        variable err 
     4201        err = V_WriteWaveToHDF(fname, groupName, varName, wTmpWrite) 
     4202        if(err) 
     4203                Print "HDF write err = ",err 
     4204        endif 
     4205        // now be sure to kill the data folder to force a re-read of the data next time this file is read in 
     4206//      err = V_KillNamedDataFolder(fname) 
     4207//      if(err) 
     4208//              Print "DataFolder kill err = ",err 
     4209//      endif 
     4210        return(err) 
     4211End 
     4212 
     4213 
     4214// fname is a local WORK folder 
     4215Function V_putDet_beam_center_y(fname,detStr,val) 
     4216        String fname,detStr 
     4217        Variable val 
     4218 
     4219//root:Packages:NIST:VSANS:RAW:entry:instrument:detector_FB:beam_center_y 
     4220        String path = "root:Packages:NIST:VSANS:"+fname+":" 
     4221        path += "entry:instrument:detector_"+detStr+":beam_center_y" 
     4222         
     4223        Wave/Z w = $path 
     4224        if(waveExists(w) == 0) 
     4225                return(1) 
     4226        else 
     4227        w[0] = val 
     4228                return(0) 
     4229        endif 
     4230 
     4231End 
     4232 
     4233// fname is a local WORK folder 
     4234Function V_putDet_beam_center_y_pix(fname,detStr,val) 
     4235        String fname,detStr 
     4236        Variable val 
     4237 
     4238//root:Packages:NIST:VSANS:RAW:entry:instrument:detector_FB:beam_center_y_pix 
     4239        String path = "root:Packages:NIST:VSANS:"+fname+":" 
     4240        path += "entry:instrument:detector_"+detStr+":beam_center_y_pix" 
     4241         
     4242        Wave/Z w = $path 
     4243        if(waveExists(w) == 0) 
     4244                return(1) 
     4245        else 
     4246        w[0] = val 
     4247                return(0) 
     4248        endif 
     4249 
     4250End 
    42144251 
    42154252// TODO -- write this function to return a WAVE with the data 
Note: See TracChangeset for help on using the changeset viewer.