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.

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
Files:
3 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 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MainPanel.ipf

    r764 r885  
    227227End 
    228228 
    229 Proc TISANE_MainButtonProc(ctrlName) : ButtonControl 
    230         String ctrlName 
    231          
    232         if(exists("Show_TISANE_Panel")==0) 
     229//Proc TISANE_MainButtonProc(ctrlName) : ButtonControl 
     230//      String ctrlName 
     231//       
     232//      if(exists("Show_TISANE_Panel")==0) 
     233//              // procedure file was not loaded 
     234//              DoAlert 0,"This operation is not available in this set of macros" 
     235//      else 
     236//              Show_TISANE_Panel() 
     237//      endif 
     238//       
     239//End 
     240 
     241Proc Event_MainButtonProc(ctrlName) : ButtonControl 
     242        String ctrlName 
     243         
     244        if(exists("Show_Event_Panel")==0) 
    233245                // procedure file was not loaded 
    234246                DoAlert 0,"This operation is not available in this set of macros" 
    235247        else 
    236                 Show_TISANE_Panel() 
     248                Show_Event_Panel() 
    237249        endif 
    238250         
     
    355367        Button MainButton_3f,pos={150,120},size={110,20},title="WorkFile Math",proc=WorkMath_MainButtonProc 
    356368        Button MainButton_3f,help={"Perfom simple math operations on workfile data"} 
    357         Button MainButton_3g,pos={150,180},size={100,20},title="TISANE",proc=TISANE_MainButtonProc 
     369        Button MainButton_3g,pos={150,180},size={100,20},title="Event Data",proc=Event_MainButtonProc 
    358370        Button MainButton_3g,help={"Manipulate TISANE Timeslice data"} 
    359371         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Menu.ipf

    r838 r885  
    4444                "Bin QxQy Data to 1D",BinQxQy_to_1D() 
    4545        End 
     46        Submenu "Event Processing" 
     47                "Event Mode Process Panel",Show_Event_Panel() 
     48                "Adjust Events",ShowEventCorrectionPanel() 
     49                "Create Custom Bins",Show_CustomBinPanel() 
     50                "-" 
     51                "Split Large File",SplitBigFile() 
     52                "Accumulate First Slice",AccumulateSlices(0) 
     53                "Add Current Slice",AccumulateSlices(1) 
     54                "Display Accumulated Slices",AccumulateSlices(2)         
     55        End 
    4656        "-" 
    4757        "NCNR Preferences",Show_Preferences_Panel() 
Note: See TracChangeset for help on using the changeset viewer.