Ignore:
Timestamp:
Jun 1, 2011 11:30:33 AM (12 years ago)
Author:
srkline
Message:

Smear_2D procedures to plot resolution function at each pixel have been improved, and to integrate the resolution to check that it normalizes to 1.

+ other minor tweaks to convert VAX time and to clean up list behavior.

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
Files:
2 edited

Legend:

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

    r749 r801  
    6363                Main_Panel() 
    6464        Endif 
    65         ResizeCmdWindow() 
     65//      ResizeCmdWindow() 
    6666         
    6767        //unload the NCNR_Package_Loader, if NCNR not defined 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf

    r800 r801  
    520520//      print yr,mon,day 
    521521        time_secs = date2secs(yr,mon,day) 
     522 
     523        return(time_secs) 
     524end 
     525 
     526// dd-mon-yyyy hh:mm:ss -> seconds 
     527// the VAX uses 24 hr time for hh 
     528// 
     529Function ConvertVAXDateTime2secs(dateAndTime) 
     530        string dateAndTime 
     531         
     532        Variable day,yr,mon,hh,mm,ss,time_secs 
     533        string str,monStr 
     534         
     535        str=dateandtime 
     536        sscanf str,"%d-%3s-%4d %d:%d:%d",day,monStr,yr,hh,mm,ss 
     537        mon = monStr2num(monStr) 
     538//      print yr,mon,day,hh,mm,ss 
     539        time_secs = date2secs(yr,mon,day) 
     540        time_secs += hh*3600 + mm*60 + ss 
     541 
    522542 
    523543        return(time_secs) 
     
    15011521End 
    15021522 
     1523// a utility function so that I can get the values from the command line 
     1524// since the atten_err is PBR 
     1525// 
     1526Function PrintAttenuation(instr,lam,attenNo) 
     1527        String instr 
     1528        Variable lam,attenNo 
     1529         
     1530        Variable atten_err, attenFactor 
     1531         
     1532        strswitch(instr) 
     1533                case "NG3": 
     1534                        attenFactor = LookupAttenNG3(lam,attenNo,atten_err) 
     1535                        break 
     1536                case "NG5": 
     1537                        //using NG7 lookup Table 
     1538                        attenFactor = LookupAttenNG7(lam,attenNo,atten_err) 
     1539                        break 
     1540                case "NG7": 
     1541                        attenFactor = LookupAttenNG7(lam,attenNo,atten_err) 
     1542                        break 
     1543                default:                                                         
     1544                        //return error? 
     1545                        attenFactor=1 
     1546        endswitch 
     1547 
     1548        Print "atten, err = ", attenFactor, atten_err 
     1549         
     1550        return(0) 
     1551End 
     1552 
     1553 
     1554 
    15031555//returns the proper attenuation factor based on the instrument (NG3, NG5, or NG7) 
    15041556//NG5 values are taken from the NG7 tables (there is very little difference in the 
Note: See TracChangeset for help on using the changeset viewer.