- Timestamp:
- Sep 13, 2018 2:03:34 PM (4 years ago)
- Location:
- sans/Dev
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/EventModeProcessing.ipf
r1050 r1115 4349 4349 4350 4350 End 4351 4352 4353 4354 Proc InsertTimeReset(period) 4355 Variable period 4356 4357 fInsertTimeReset(period) 4358 End 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 // 4370 Function 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) 4397 End 4398 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Menu.ipf
r1001 r1115 55 55 "Add Current Slice",AccumulateSlices(1) 56 56 "Display Accumulated Slices",AccumulateSlices(2) 57 "-" 58 "Insert Time Reset",InsertTimeReset() 57 59 End 58 60 "-" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_EventModeProcessing.ipf
r1100 r1115 1050 1050 // load from raw? 1051 1051 // if so, which carriage? 1052 String loadFromRAW 1052 String loadFromRAW="No" 1053 1053 String detStr 1054 1054 if(cmpstr(ctrlName,"button23")==0) … … 1180 1180 1181 1181 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() 1195 1196 endif 1196 1197 1197 1198 1198 1199 if(mode == MODE_OSCILL) // oscillatory mode - don't adjust the times, we get periodic t0 to reset t=0 1200 KillWaves/Z rescaledTime 1199 1201 Duplicate/O timePt rescaledTime 1200 1202 rescaledTime *= timeStep_s //convert to seconds and that's all … … 1209 1211 // MODE_TOF 1210 1212 if(mode == MODE_TOF) // TOF mode - don't adjust the times, we get periodic t0 to reset t=0 1213 KillWaves/Z rescaledTime 1211 1214 Duplicate/O timePt rescaledTime 1212 1215 rescaledTime *= timeStep_s //convert to seconds and that's all -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_WorkFolderUtils.ipf
r1113 r1115 895 895 896 896 saved_mon_tmp = V_getBeamMonNormSaved_count(tmpType) 897 scale_tmp = saved_mon_ dest/defMon //un-scaling factor897 scale_tmp = saved_mon_tmp/defMon //un-scaling factor 898 898 899 899 new_scale = defMon / (saved_mon_dest+saved_mon_tmp)
Note: See TracChangeset
for help on using the changeset viewer.