Changeset 1240


Ignore:
Timestamp:
Feb 21, 2020 1:32:52 PM (3 years ago)
Author:
srkline
Message:

VSANS: changes here are simply cleaning up comments and TODO items

SANS: added a contextual menu simialr to VSANS so that RAW, MSK, DIV can be directly loaded from the FileCatalog?, in the sam way that they are in VSANS

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction
Files:
6 edited

Legend:

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

    r1004 r1240  
    131131 
    132132                ModifyTable width(Point)=0              //JUN04, remove point numbers - confuses users since point != run 
     133                 
     134                // (DONE - FEB 2020) 
     135        //  x- experimental hook with contextual menu 
     136        //               
     137                SetWindow kwTopWin hook=CatTableHook, hookevents=1      // mouse down events 
    133138        Endif 
    134139 
     
    865870        //Notebook CatWin,text=temp 
    866871End 
     872 
     873 
     874// 
     875// TODO: 
     876//  this is experimental...not been tested by any users yet 
     877// -- FEB 2020 copied this function over from VSANS, since it was popular there 
     878// 
     879// -- what else to add to the menu? (MSK and DIV now work) 
     880// -- add directly to WORK files? 
     881// -- "set" as some special file type, intent, use? (quick "patch" operations) 
     882// -- "check" the reduction protocol for completeness? 
     883// 
     884// x- seems to not "let go" of a selection (missing the mouse up?) 
     885//    (possibly) less annoying if I only handle mouseup and present a menu then. 
     886// 
     887Function CatTableHook(infoStr) 
     888        String infoStr 
     889        String event= StringByKey("EVENT",infoStr) 
     890         
     891        Variable ii 
     892         
     893        String pathStr 
     894        PathInfo catPathName 
     895        pathStr = S_path 
     896         
     897//      Print "EVENT= ",event 
     898        strswitch(event) 
     899                case "mouseup": 
     900//                      Variable xpix= NumberByKey("MOUSEX",infoStr) 
     901//                      Variable ypix= NumberByKey("MOUSEY",infoStr) 
     902//                      PopupContextualMenu/C=(xpix, ypix) "yes;no;maybe;" 
     903                        PopupContextualMenu "Load RAW;Load MSK;Load DIV;-;Send to MRED;" 
     904         
     905         
     906         
     907 
     908//              root:myGlobals:CatVSHeaderInfo:Filenames         
     909                        WAVE/T Filenames = $"root:myGlobals:CatVSHeaderInfo:Filenames" 
     910                        Variable err 
     911                        strswitch(S_selection) 
     912                                case "Load RAW": 
     913                                        GetSelection table,CatVSTable,1 
     914//                                      Print V_flag, V_startRow, V_startCol, V_endRow, V_endCol 
     915                                        Print "Loading " + FileNames[V_StartRow] 
     916                                        ReadHeaderAndData(pathStr + FileNames[V_StartRow])      //this is the full Path+file 
     917//                                      err = V_LoadHDF5Data(FileNames[V_StartRow],"RAW") 
     918                                        if(!err)                //directly from, and the same steps as DisplayMainButtonProc(ctrlName) 
     919                                                // this (in SANS) just passes directly to fRawWindowHook() 
     920                                                UpdateDisplayInformation("RAW")         // plot the data in whatever folder type 
     921                                        endif 
     922                                        break 
     923                                         
     924                                case "Load MSK": 
     925                                        GetSelection table,CatVSTable,1 
     926//                                      Print V_flag, V_startRow, V_startCol, V_endRow, V_endCol 
     927                                        Print "Loading " + FileNames[V_StartRow] 
     928                                        ReadMCID_MASK(pathStr + FileNames[V_StartRow]) 
     929                                        Execute "maskButtonProc(\"maskButton\")" 
     930                                         
     931                                        break 
     932                                         
     933                                case "Load DIV": 
     934                                        GetSelection table,CatVSTable,1 
     935//                                      Print V_flag, V_startRow, V_startCol, V_endRow, V_endCol 
     936                                        Print "Loading " + FileNames[V_StartRow] 
     937                                         
     938                                        ReadHeaderAndWork("DIV",pathStr + FileNames[V_StartRow]) 
     939                                         
     940                                        break 
     941                                case "Send to MRED": 
     942                                        //  root:myGlobals:MRED:gFileNumList 
     943                                        SVAR/Z numList=root:myGlobals:MRED:gFileNumList 
     944                                        if(SVAR_Exists(numList)) 
     945                                                GetSelection table,CatVSTable,1 
     946                                                for(ii=V_StartRow;ii<=V_endRow;ii+=1) 
     947        //                                              Print "selected " + FileNames[ii] 
     948                                                        numList += fileNames[ii] + "," 
     949                                                endfor 
     950                                                // pop the menu on the mred panel 
     951                                                MREDPopMenuProc("",1,"") 
     952                                        endif 
     953                                        break 
     954                                         
     955                        endswitch               //popup selection 
     956        endswitch       // event 
     957         
     958        return 0 
     959End 
     960 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_SideView.ipf

    r1133 r1240  
    1111// where the detector views overlap 
    1212// 
    13 // TODO:  
     13// DONE:  
    1414// -x  make sure that all of the values are from global constants, not hard-wired values 
    1515// 
     
    4444End 
    4545 
    46 // TODO:  
     46// DONE:  
    4747// -x account for the 41cm SDD setback for the T/B detectors. These are only seen in the side view. 
    4848// 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_DetectorCorrections.ipf

    r1239 r1240  
    167167        // the distance perpendicular to the tube is n*(8.4mm) per tube index 
    168168         
    169         // TODO 
    170         // -- GAP IS HARD-WIRED as constant values  
     169        // DONE 
     170        // -- GAP was hard-wired, but in 2018 proper values for all 4 gaps were measured 
     171        // and added to the file header for each detector panel. there is now a read from the  
     172        // header to get the gap value  
    171173        Variable offset,gap 
    172174 
    173 // kPanelTouchingGap is in mm    
    174 // the gap is split equally between the panel pairs 
    175 // (DONE) -- replace all of this with V_getDet_panel_gap(fname,detStr) once it is added to the file 
    176  
    177175        gap = V_getDet_panel_gap(fname,detStr) 
    178176 
    179 // TODO: 
    180 // -- once the gap fields have been verified, this check can be removed 
     177// DONE: 
     178// -- in case of error, V_getDet_panel_gap() will return -999999 
    181179// -- it should only apply to data pre-2018 when the field did not exist in the file 
    182 // -- any VSANS data from 2018+ should read gap from the file. 
     180// -- any VSANS data from 2018+ should read gap from the file and bypass the if() 
    183181 
    184182        if(gap < -100)          //-999999 returned if field is missing from file 
     
    446444        Variable gap  
    447445 
    448 // kPanelTouchingGap is in mm    
    449446// the gap is split equally between the panel pairs 
    450 // TODO -- replace all of this with V_getDet_panel_gap(fname,detStr) once it is added to the file 
    451 // these hard-wired values were determined from 6A and WB beam centers. LR values were exactly the same for 
    452 // both beam considitions (+/- 0.0 mm). FTB was +/- 0.8 mm, MTB +/- 2 mm 
     447// DONE -- replace hard-wired values with V_getDet_panel_gap(fname,detStr) once it is added to the file 
    453448 
    454449        gap = V_getDet_panel_gap(folder,detStr) 
    455450 
    456 // TODO: 
    457 // -- once the gap fields have been verified, this check can be removed 
     451// DONE: 
     452// -- check in case of error, value should be read from header 
    458453// -- it should only apply to data pre-2018 when the field did not exist in the file 
    459454// -- any VSANS data from 2018+ should read gap from the file. 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_ISO8601_Util.ipf

    r1238 r1240  
    4747// Call w/ DateTime as the argument as V_CurrentTime_to_ISO8601String(DateTime) 
    4848// 
    49 // TODO -- verify that this is correct 
     49// DONE -- verify that this is correct 
    5050Function/S V_CurrentTime_to_ISO8601String(now) 
    5151        Variable now 
     
    7171// "The DateTime function returns number of seconds from 1/1/1904 to the current date and time." 
    7272// 
    73 // TODO -- verify that this is correct, since I'm not actually parsing the string, but rather 
     73// DONE -- verify that this is correct, since I'm not actually parsing the string, but rather 
    7474// counting on the string to be EXACTLY the correct format 
    7575// 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Initialize.ipf

    r1236 r1240  
    2424Constant kVSANSVersion = 7.99 
    2525 
    26 // TODO -- need to set up a separate file of "constants" or "globals" where the actual numbers are 
    27 //stored. If there are not a lot, that place could be here. InitFacilityGlobals() is currently in NCNR_Utils.ipf 
     26// DONE -- store all of the constant values here in the initialization routine. no need 
     27// to set up a separate file of "constants" or "globals" where the actual numbers are 
     28//stored. 
    2829 
    2930 
     
    3334Constant kBCTR_CM = 1                   //set to 1 to use beam center in cm. O to use pixels 
    3435 
    35 // // TODO: -- replace this constant with V_getDet_panel_gap(fname,detStr) 
    36 //Constant kPanelTouchingGap = 10                       // TODO -- measure this gap when panels "touch", UNITS OF mm, not cm 
     36// // DONE: -- replace this constant with V_getDet_panel_gap(fname,detStr) 
     37//Constant kPanelTouchingGap = 10                       // DONE -- gap when panels "touch", UNITS OF mm, not cm 
    3738 
    3839 
     
    258259        endif 
    259260         
    260         // TODO x- find the SANS preferences, copy over and update for VSANS 
     261        // DONE x- find the SANS preferences, copy over and update for VSANS 
    261262        // x- these are all in PlotUtilsMacro_v40.ipf as the preferences are set up as common 
    262263        // to all packages. I'm not sure that I want to do this with VSANS, but make the packages 
     
    481482 
    482483        // clean out, so that the file SAVE is not slow due to the large experiment size 
    483         // TODO -- decide if this is really necessary 
     484        // DONE - 
    484485//       
    485486//      V_CleanOutRawVSANS() 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MaskUtils.ipf

    r1227 r1240  
    1717///// LOADING 
    1818 
    19 // TODO  
     19// DONE  
    2020// x- when mask is loaded, need to be sure to clean up the "extra" waves that may be present 
    2121// 
     
    111111//      ModifyGraph width={Plan,1,bottom,left} 
    112112// 
    113 // TODO 
     113// DONE 
    114114//  need buttons for: 
    115115//              x- quit (to exit gracefully) (no, just close the window is fine) 
     
    821821// 
    822822// TODO 
     823// -- put in the current date, as is done for the DIV file 
    823824// -- make the number of pixels GLOBAL to pick up the right numbers for the detector dimensions 
    824825//  x- there will be lots of work to do to develop the procedures necessary to actually generate the  
     
    11111112// TODO: 
    11121113// -- label panels, axes 
    1113 // -- add in display of "B" 
     1114// x- add in display of "B" 
    11141115 
    11151116Proc V_Display_Det_Panels() 
Note: See TracChangeset for help on using the changeset viewer.