Ignore:
Timestamp:
Dec 13, 2012 11:58:20 AM (10 years ago)
Author:
srkline
Message:

Changed the TISANE button on the main panel to be "Event Data"

Added commands to the SANS menu for event mode data, inlcluding opening the panels and splitting large files.

fixed a bug in the reloading of previously adjusted data where oscillatory data would be rescaled to the first event time. Now there is no rescaling of the time.

File:
1 edited

Legend:

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

    r884 r885  
    9696// 
    9797 
    98 Menu "Macros" 
    99         "Split Large File",SplitBigFile() 
    100         "Accumulate First Slice",AccumulateSlices(0) 
    101         "Add Current Slice",AccumulateSlices(1) 
    102         "Display Accumulated Slices",AccumulateSlices(2)         
    103 End 
     98//Menu "Macros" 
     99//      "Split Large File",SplitBigFile() 
     100//      "Accumulate First Slice",AccumulateSlices(0) 
     101//      "Add Current Slice",AccumulateSlices(1) 
     102//      "Display Accumulated Slices",AccumulateSlices(2)         
     103//End 
    104104 
    105105 
     
    770770// I think that only the processing is different. so this could be 
    771771// consolidated into a single loader. 
     772// 
     773// ** currently, the "stream" loader uses the first data point as time=0 
     774//    and rescales everything to that time. "Osc" loading uses the times "as-is" 
     775//    from the file, trusting the times to be correct. 
    772776// 
    773777// Would TISANE or TOF need a different loader? 
     
    21192123                        endif 
    21202124                         
     2125                        NVAR mode = root:Packages:NIST:gEvent_Mode                              // ==0 for "stream", ==1 for Oscillatory 
    21212126                        // clear out the old sort index, if present, since new data is being loaded 
    21222127                        KillWaves/Z OscSortIndex 
     
    21242129 
    21252130                        Duplicate/O timePt rescaledTime 
    2126                         rescaledTime = 1e-7*(timePt-timePt[0])          //convert to seconds and start from zero 
     2131                        if(mode==0) 
     2132                                rescaledTime = 1e-7*(timePt-timePt[0])          //convert to seconds and start from zero 
     2133                        else 
     2134                                rescaledTime = timePt*1e-7                                              //just take the times as-is 
     2135                        endif 
     2136                         
    21272137                        t_longest = waveMax(rescaledTime)               //should be the last point 
     2138                         
    21282139         
    21292140                        fileStr = ParseFilePath(0, filepathstr, ":", 1, 0) 
     
    24762487// 
    24772488 
    2478 Macro SplitBigFile(splitSize, baseStr) 
     2489Proc SplitBigFile(splitSize, baseStr) 
    24792490        Variable splitSize = 100 
    24802491        String baseStr="split" 
     
    25872598// mode = 1             add current slicedData to accumulatedData 
    25882599// mode = 2             copy accumulatedData to slicedData in preparation of export or display 
    2589 // mode = 3             sing a song 
     2600// mode = 3             sing a song, dance a dance 
    25902601// 
    25912602Function AccumulateSlices(mode) 
     
    25962607        switch(mode)     
    25972608                case 0: 
     2609                        DoAlert 0,"The current data has been copied to the accumulated set. You are now ready to add more data." 
    25982610                        KillWaves/Z accumulatedData 
    25992611                        Duplicate/O slicedData accumulatedData           
    26002612                        break 
    26012613                case 1: 
     2614                        DoAlert 0,"The current data has been added to the accumulated data. You can add more data." 
    26022615                        Wave acc=accumulatedData 
    26032616                        Wave cur=slicedData 
     
    26052618                        break 
    26062619                case 2: 
     2620                        DoAlert 0,"The accumulated data is now the display data and is ready for display or export." 
    26072621                        Duplicate/O accumulatedData slicedData           
    26082622                        break 
Note: See TracChangeset for help on using the changeset viewer.