Changeset 1115


Ignore:
Timestamp:
Sep 13, 2018 2:03:34 PM (4 years ago)
Author:
srkline
Message:

attempting to put the zip file of the package in some accessible location since webster has been cut off.

Location:
sans/Dev
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/EventModeProcessing.ipf

    r1050 r1115  
    43494349         
    43504350End 
     4351 
     4352 
     4353 
     4354Proc InsertTimeReset(period) 
     4355        Variable period 
     4356         
     4357        fInsertTimeReset(period) 
     4358End 
     4359 
     4360 
     4361// 
     4362// for event data where a time reset signal was not sent, but the data is 
     4363// actually periodic. This function will reset the time at the input period. 
     4364// This assumes that you accurately know the period, and that the start time 
     4365// of the data coincides with the start time of the period, otherwise the  
     4366// time reset will happen in the middle of the cycle. 
     4367// 
     4368// period = period of reset (s) 
     4369// 
     4370Function fInsertTimeReset(period) 
     4371        Variable period 
     4372         
     4373        SetDataFolder root:Packages:NIST:Event: 
     4374         
     4375        Wave rescaledTime = rescaledTime 
     4376        Wave timePt = timePt 
     4377        Variable rollTime,rollTicks,ii,delta 
     4378         
     4379        Variable period_ticks 
     4380         
     4381        period_ticks = period*1e7               //period in ticks 
     4382         
     4383 
     4384        for(ii=0;ii<numpnts(rescaledTime)-1;ii+=1) 
     4385                if(rescaledTime[ii] > period) 
     4386                        MultiThread timePt[ii,] -= period_ticks 
     4387                        MultiThread rescaledTime[ii,] -= period 
     4388                endif 
     4389        endfor 
     4390 
     4391// updates the longest time (as does every operation of adjusting the data) 
     4392        NVAR t_longest = root:Packages:NIST:Event:gEvent_t_longest 
     4393        t_longest = waveMax(rescaledTime) 
     4394        SetDataFolder root: 
     4395 
     4396        return(0) 
     4397End 
     4398 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Menu.ipf

    r1001 r1115  
    5555                "Add Current Slice",AccumulateSlices(1) 
    5656                "Display Accumulated Slices",AccumulateSlices(2)         
     57                "-" 
     58                "Insert Time Reset",InsertTimeReset() 
    5759        End 
    5860        "-" 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_EventModeProcessing.ipf

    r1100 r1115  
    10501050        // load from raw? 
    10511051        // if so, which carriage? 
    1052         String loadFromRAW 
     1052        String loadFromRAW="No" 
    10531053        String detStr 
    10541054        if(cmpstr(ctrlName,"button23")==0) 
     
    11801180 
    11811181        if(mode == MODE_STREAM)         // continuous "Stream" mode - start from zero 
    1182         v_tic() 
    1183         printf "Duplicate wave = " 
    1184                 Duplicate/O timePt rescaledTime 
    1185         v_toc() 
    1186         v_tic() 
    1187         printf "rescale time = " 
    1188 //              rescaledTime = 1*(timePt-timePt[0])             //convert to nanoseconds and start from zero 
    1189                 rescaledTime = timeStep_s*(timePt-timePt[0])            //convert to seconds and start from zero 
    1190         v_toc() 
    1191         v_tic() 
    1192         printf "find wave Max = " 
    1193                 t_longest = waveMax(rescaledTime)               //should be the last point       
    1194         v_toc() 
     1182                v_tic() 
     1183                printf "Duplicate wave = " 
     1184                        KillWaves/Z rescaledTime 
     1185                        Duplicate/O timePt rescaledTime 
     1186                v_toc() 
     1187                v_tic() 
     1188                printf "rescale time = " 
     1189        //              rescaledTime = 1*(timePt-timePt[0])             //convert to nanoseconds and start from zero 
     1190                        rescaledTime = timeStep_s*(timePt-timePt[0])            //convert to seconds and start from zero 
     1191                v_toc() 
     1192                v_tic() 
     1193                printf "find wave Max = " 
     1194                        t_longest = waveMax(rescaledTime)               //should be the last point       
     1195                v_toc() 
    11951196        endif 
    11961197 
    11971198         
    11981199        if(mode == MODE_OSCILL)         // oscillatory mode - don't adjust the times, we get periodic t0 to reset t=0 
     1200                KillWaves/Z rescaledTime 
    11991201                Duplicate/O timePt rescaledTime 
    12001202                rescaledTime *= timeStep_s                      //convert to seconds and that's all 
     
    12091211// MODE_TOF 
    12101212        if(mode == MODE_TOF)            // TOF mode - don't adjust the times, we get periodic t0 to reset t=0 
     1213                KillWaves/Z rescaledTime 
    12111214                Duplicate/O timePt rescaledTime 
    12121215                rescaledTime *= timeStep_s              //convert to seconds and that's all 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_WorkFolderUtils.ipf

    r1113 r1115  
    895895         
    896896        saved_mon_tmp = V_getBeamMonNormSaved_count(tmpType) 
    897         scale_tmp = saved_mon_dest/defMon                       //un-scaling factor 
     897        scale_tmp = saved_mon_tmp/defMon                        //un-scaling factor 
    898898 
    899899        new_scale = defMon / (saved_mon_dest+saved_mon_tmp) 
Note: See TracChangeset for help on using the changeset viewer.