Ignore:
Timestamp:
Feb 3, 2009 3:57:08 PM (14 years ago)
Author:
srkline
Message:

A large number of changes and fixes:

--168/169/170: panels and windows are now at least on-screen for all packages. Tested
with 1024x768 resolution.
-- closed ticket 176 which was a question about resampling data to generate error estimates
on fitted parameters. Useful for reflectometry, not needed for SANS.
--157: bug of low Q power law extrapolation in Invariant fixed by avoiding q==0
--178/180: Tr/Tw? notification in USANS. log/lin checkbox for display.
--167: saveData checkbox for USANS not behaving well. turns off/on better now.
--197: changed all (?) 1D writing routines to enforce 26 characters as the maximum length
to make sure that file loading will never exceed 31 characters

-- lots of changes to MonteCarlo? and SASCALC

  • SASCALC now enforces *exact* lens conditions, rather than a close approximation
  • improved MonteCarlo? interface panel
  • added writer for simlulated VAX binary data file
  • can save 2D as ABS or raw counts
  • can freeze w/no offset
File:
1 edited

Legend:

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

    r467 r472  
    830830// returns the path to the file, or null if the user cancelled 
    831831// fancy use of optional parameters 
     832//  
     833// enforce short file names (26 characters) 
    832834Function/S DoSaveFileDialog(msg,[fname,suffix]) 
    833835        String msg,fname,suffix 
     
    844846        endif 
    845847         
    846         String outputPath,tmpName 
     848        String outputPath,tmpName,testStr 
     849        Variable badLength=0,maxLength=26,l1,l2 
     850         
     851         
    847852        tmpName = fname + suffix 
    848853         
    849         Open/D/M=msg/T="????" refNum as tmpName 
    850         outputPath = S_fileName 
     854        do 
     855                badLength=0 
     856                Open/D/M=msg/T="????" refNum as tmpName 
     857                outputPath = S_fileName 
     858                 
     859                testStr = ParseFilePath(0, outputPath, ":", 1, 0)               //just the filename 
     860                if(strlen(testStr)==0) 
     861                        break           //cancel, allow exit 
     862                endif 
     863                if(strlen(testStr) > maxLength) 
     864                        badlength = 1 
     865                        DoAlert 2,"File name is too long. Is\r"+testStr[0,25]+"\rOK?" 
     866                        if(V_flag==3) 
     867                                outputPath = "" 
     868                                break 
     869                        endif 
     870                        if(V_flag==1)                   //my suggested name is OK, so trim the output 
     871                                badlength=0 
     872                                l1 = strlen(testStr)            //too long length 
     873                                l1 = l1-maxLength               //number to trim 
     874                                //Print outputPath 
     875                                l2=strlen(outputPath) 
     876                                outputPath = outputPath[0,l2-1-l1] 
     877                                //Print "modified  ",outputPath 
     878                        endif 
     879                        //if(V_flag==2)  do nothing, let it go around again 
     880                endif 
     881                 
     882        while(badLength) 
    851883         
    852884        return outputPath 
Note: See TracChangeset for help on using the changeset viewer.