Ignore:
Timestamp:
Mar 11, 2016 3:36:43 PM (7 years ago)
Author:
srkline
Message:

lots of changes to 1D averaging and the plotting routines, detector corrections, and basic reads

File:
1 edited

Legend:

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

    r983 r984  
    408408 
    409409// 
    410 // TODO -- currently hard-wired for the only fit function 
    411 // 
     410// TODO -- currently hard-wired for coefficients from the only fit function 
     411// 
     412// -- will need to recalc mm center AND q-values 
    412413Function WriteCtrButtonProc(ba) : ButtonControl 
    413414        STRUCT WMButtonAction &ba 
     
    427428                        V_putDet_beam_center_y(fname,detStr,coefW[10]) 
    428429 
     430                        DoAlert 0, "-- will need to recalc mm center AND q-values" 
     431                         
    429432                        break 
    430433                case -1: // control being killed 
     
    442445// 
    443446// 
    444 // function to call the fit fucntion (2D) 
     447// function to call the fit function (2D) 
    445448// 
    446449Function DetFitButtonProc(ba) : ButtonControl 
     
    572575// -- will need to remove the hard-wired values and get the proper values from the data 
    573576// -- ?? will the "proper" values be in pixels or distance? All depends on how I display the data... 
    574 // -- may want to keep the nominal scaling values around in case the proper values aren' in the file 
     577// -- may want to keep the nominal scaling values around in case the proper values aren't in the file 
     578// 
     579// 
     580// 
     581//•print xCtr_pix 
     582//  xCtr_pix[0]= {64,64,55,-8.1,64,64,55,-8.1,63.4} 
     583//•print yCtr_pix 
     584//  yCtr_pix[0]= {-8.7,55,64,64,-8.7,55,64,64,62.7} 
    575585// 
    576586Function V_RestorePanels() 
     
    580590        Variable ii,xCtr,yCtr 
    581591 
    582 //// this works if the proper centers are in the file - otherwise, it's a mess   
    583 //      fname = "RAW" 
    584 //      for(ii=0;ii<ItemsInList(ksDetectorListNoB);ii+=1) 
    585 //              detStr = StringFromList(ii, ksDetectorListNoB, ";") 
    586 //              xCtr = V_getDet_beam_center_x(fname,detStr) 
    587 //              yCtr = V_getDet_beam_center_y(fname,detStr) 
    588 //              V_RescaleToBeamCenter("RAW",detStr,xCtr,yCtr) 
    589 //      endfor 
     592// this works if the proper centers are in the file - otherwise, it's a mess     
     593// "B" is skipped here, as it should be... 
     594        fname = "RAW" 
     595        for(ii=0;ii<ItemsInList(ksDetectorListNoB);ii+=1) 
     596                detStr = StringFromList(ii, ksDetectorListNoB, ";") 
     597                xCtr = V_getDet_beam_center_x(fname,detStr) 
     598                yCtr = V_getDet_beam_center_y(fname,detStr) 
     599                V_RescaleToBeamCenter("RAW",detStr,xCtr,yCtr) 
     600        endfor 
    590601                 
    591602                 
    592603                // nominal values... better to use what's in the file 
    593 // 
    594                 V_RescaleToBeamCenter("RAW","MB",64,55) 
    595                 V_RescaleToBeamCenter("RAW","MT",64,-8.7) 
    596                 V_RescaleToBeamCenter("RAW","MR",-8.1,64) 
    597                 V_RescaleToBeamCenter("RAW","ML",55,64) 
    598                 V_RescaleToBeamCenter("RAW","FB",64,55) 
    599                 V_RescaleToBeamCenter("RAW","FT",64,-8.7) 
    600                 V_RescaleToBeamCenter("RAW","FR",-8.1,64) 
    601                 V_RescaleToBeamCenter("RAW","FL",55,64) 
     604//// 
     605//              V_RescaleToBeamCenter("RAW","MB",64,55) 
     606//              V_RescaleToBeamCenter("RAW","MT",64,-8.7) 
     607//              V_RescaleToBeamCenter("RAW","MR",-8.1,64) 
     608//              V_RescaleToBeamCenter("RAW","ML",55,64) 
     609//              V_RescaleToBeamCenter("RAW","FB",64,55) 
     610//              V_RescaleToBeamCenter("RAW","FT",64,-8.7) 
     611//              V_RescaleToBeamCenter("RAW","FR",-8.1,64) 
     612//              V_RescaleToBeamCenter("RAW","FL",55,64) 
     613                 
     614                 
    602615        return(0) 
    603616end 
     
    657670                // TODO 
    658671                // and now the mm values 
     672                xCtr_mm[ii] = V_getDet_beam_center_x_mm(fname,detStr) 
     673                yCtr_mm[ii] = V_getDet_beam_center_y_mm(fname,detStr) 
    659674                 
    660675        endfor 
Note: See TracChangeset for help on using the changeset viewer.