Ignore:
Timestamp:
Feb 2, 2017 9:52:47 AM (6 years ago)
Author:
srkline
Message:

ADDED:

included common NCNR procedures for the PlotManager?, to allow plotting of 1D data sets using a familiar interface

greatly expanded Patch functionality to include input in the multiple sections of the Nexus file, including separate panels to handle patching of waves to the file - needed for non-linear coefficients, dead time, and XY beam centers. All patch operations are expandable as more fields become necessary to patch.

removed bug of group_id being defined in /reduction and in /sample (removed R/W that referenced /reduction)

added panel to "isolate" a single detector panel, allowing the corrections to be applied/removed/recalculated as needed to directly see their effects.

linked new procedures to their appropriate action buttons

Added more data fields (label, intent, etc.) to the VCALC to Nexus data writer to get more realistic values into the fake data files for testing

Added VCALC simulation functions with EMP and BGD in anticipation of testing the CORRECT step

more little bug and documentation fixes which I can't remember, but they are all important...

File:
1 edited

Legend:

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

    r999 r1022  
    1212// -- decide if it's better to write wholesale, or as individual waves 
    1313// 
    14 Macro Copy_VCALC_to_VSANSFile() 
     14Macro Copy_VCALC_to_VSANSFile(labelStr,intent,group_id) 
     15        String labelStr = "sample label" 
     16        String intent = "SAMPLE" 
     17        variable group_id = 75 
    1518         
    1619        String fileName = V_DoSaveFileDialog("pick the file to write to") 
     
    1821//       
    1922        if(strlen(fileName) > 0) 
    20                 writeVCALC_to_file(fileName) 
     23                writeVCALC_to_file(fileName,labelStr,intent,group_id) 
    2124        endif 
    2225End 
     
    2528// TODO -- fill this in as needed to get fake data that's different 
    2629// 
    27 Function writeVCALC_to_file(fileName) 
    28         String fileName 
     30Function writeVCALC_to_file(fileName,labelStr,intent,group_id) 
     31        String fileName,labelStr,intent 
     32        Variable group_id 
    2933 
    3034 
     
    3438// the middle SDD (correct units) 
    3539// the back SDD (correct units) 
    36         Variable ii,val 
     40        Variable ii,val,sumCts=0 
    3741        String detStr 
    3842        for(ii=0;ii<ItemsInList(ksDetectorListAll);ii+=1) 
     
    7377                // V_writeDetector_deadtime(fname,detStr,inW) 
    7478                // TODO: need a new, separate function to write the single deadtime value in/out of "B" 
     79                 
     80                // integrated count value on each detector bank 
     81                sumCts += sum(tmpData) 
     82                V_writeDet_IntegratedCount(fileName,detStr,sum(tmpData)) 
    7583 
    7684        endfor 
     
    8896        V_writeWavelength(fileName,VCALC_getWavelength()) 
    8997 
    90 // description of the sample 
    91  
    92 // sample information 
    93 // name, title, etc 
    9498         
    9599// fake the information about the count setup, so I have different numbers to read 
     
    97101        V_writeCount_time(fileName,100) 
    98102 
    99 // monitor count (= imon) 
    100 // returns the number of neutrons on the sample 
    101 //Function VCALC_getImon() 
     103        // monitor count (= imon) 
     104                // returns the number of neutrons on the sample 
     105                //Function VCALC_getImon() 
     106        V_writeMonitorCount(fileName,VCALC_getImon()) 
     107 
     108        // total detector count (sum of everything) 
     109        V_writeDetector_counts(fileName,sumCts) 
     110 
     111        // sample description 
     112        V_writeSampleDescription(fileName,labelStr) 
     113         
     114        // reduction intent 
     115        V_writeReductionIntent(fileName,intent) 
     116         
     117        // reduction group_id 
     118        // TODO - skip for now. group_id is incorrectly written to the data file as a text value. trac ticket 
     119        //        has been written to fix in the future. 
     120//      V_writeReduction_group_ID(fileName,group_id) 
     121 
     122 
    102123 
    103124// ?? anything else that I'd like to see on the catalog - I could change them here to see different values 
    104125// different collimation types? 
    105126// 
     127 
     128 
    106129 
    107130        return(0) 
Note: See TracChangeset for help on using the changeset viewer.