Changeset 861


Ignore:
Timestamp:
Aug 6, 2012 2:58:11 PM (10 years ago)
Author:
srkline
Message:

changed the number of significant digits visible in the Catalog table, so that the wavelength, SDD, and sample position don't show up as odd floating point values, when they're only off by a smidgen. If they are significantly off, the real value will be seen.

Modified the file loader for Linearized fits to correctly handle files that are loaded with file names that are too long. Now they are loaded and plotted correctly, as the plot manager does. Now, when fitting, if the file name is too long (from the popup) then the user is prompted to pick the data set, since I don't know which one it is anymore, since the name was changed. Not too big of an issue. Most (All, I hope) of the file writing routines now enforce short, compliant names. this is ticket #363

Location:
sans/Dev/trunk/NCNR_User_Procedures
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/LinearizedFits/LinearizedFits_v40.ipf

    r770 r861  
    168168        //Print S_fileName 
    169169        //Print tempName 
    170          
    171         String cleanLastFileName = CleanupName(partialName,0) 
    172         String dataStr = "root:"+cleanLastFileName+":" 
     170 
     171 
     172        String cleanLastFileName = "",dataStr = "" 
     173         
     174        cleanLastFileName = CleanupName(partialName,0) 
     175         
     176        //if the file name was too long, get the updated name 
     177        Variable maxLength=25 
     178        if(strlen(cleanLastFileName) > maxLength) 
     179                String newStr = root:Packages:NIST:gShortNameStr                //set in ShortFileNameString() 
     180                cleanLastFileName = newStr 
     181        endif 
     182         
     183        dataStr = "root:"+cleanLastFileName+":" 
     184         
    173185        tempName=dataStr + cleanLastFileName+"_q" 
    174186        Duplicate/O $tempName xAxisWave 
     
    508520        ControlInfo/W=FitPanel $"ywave" 
    509521        String partialName = CleanupName(S_value,0) 
     522         
     523        //if the file name was too long, get the updated name. Can't guarantee that the global string set by 
     524        // ShortFileNameString is the currently selected data set, so make the user find the right data set 
     525        // 
     526        Variable maxLength=25 
     527        if(strlen(partialName) > maxLength) 
     528                // get user input, from a list of all of the data folder names 
     529                String dfList = sortList(GetAList(4)) 
     530                String dataFolder="" 
     531                Prompt dataFolder,"Data files to choose from...",popup,dfList 
     532 
     533                DoPrompt "Select data set",dataFolder 
     534                if(V_Flag==1)           //user canceled 
     535                        SetDataFolder root: 
     536                        return(1) 
     537                endif 
     538                partialName = dataFolder 
     539        endif 
    510540        Rescale_Data("root:"+partialName+":") 
    511541         
  • sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtilsMacro_v40.ipf

    r858 r861  
    975975                                outStr = inStr[0,maxLength-1] 
    976976                                //Print "modified  ",outStr 
     977                                newStr=outStr 
    977978                                return(outStr) 
    978979                        endif 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/CatVSTable.ipf

    r811 r861  
    119119                ModifyTable width(:myGlobals:CatVSHeaderInfo:nGuides)=40 
    120120                ModifyTable width(:myGlobals:CatVSHeaderInfo:Pos)=30 
     121                ModifyTable sigDigits(:myGlobals:CatVSHeaderInfo:Pos)=3                 //to make the display look nice, given the floating point values from ICE 
     122                ModifyTable sigDigits(:myGlobals:CatVSHeaderInfo:Lambda)=3              //may not work in all situations, but an improvement 
     123                ModifyTable sigDigits(:myGlobals:CatVSHeaderInfo:SDD)=5 
     124                ModifyTable trailingZeros(:myGlobals:CatVSHeaderInfo:Temperature)=1 
     125                ModifyTable sigDigits(:myGlobals:CatVSHeaderInfo:Temperature)=4 
    121126#endif 
    122127 
Note: See TracChangeset for help on using the changeset viewer.