Aug 6, 2012 2:58:11 PM (11 years ago)

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

1 edited


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

    r770 r861  
    168168        //Print S_fileName 
    169169        //Print tempName 
    171         String cleanLastFileName = CleanupName(partialName,0) 
    172         String dataStr = "root:"+cleanLastFileName+":" 
     172        String cleanLastFileName = "",dataStr = "" 
     174        cleanLastFileName = CleanupName(partialName,0) 
     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 
     183        dataStr = "root:"+cleanLastFileName+":" 
    173185        tempName=dataStr + cleanLastFileName+"_q" 
    174186        Duplicate/O $tempName xAxisWave 
    508520        ControlInfo/W=FitPanel $"ywave" 
    509521        String partialName = CleanupName(S_value,0) 
     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 
     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+":") 
Note: See TracChangeset for help on using the changeset viewer.