Opened 14 years ago
Closed 14 years ago
#153 closed feature (fixed)
1-D loader does not accept 2 column data sets
Reported by: | srkline | Owned by: | srkline |
---|---|---|---|
Priority: | major | Milestone: | Analysis Wish List |
Component: | Analysis | Keywords: | |
Cc: | Blocking: | ||
Task: |
Description
(From Jan Ilavsky)
On Jun 25, 2008, at 1:49 PM, Jan Ilavsky wrote:
Hello Steve,
- I patched your procedure A_LoadOneDDataWithName
to allow 2 column data only:
I added
.....
LoadWave?/G/D/A/Q fileStr
String fileName = S_fileName
Variable numCols = V_flag
changes JIL
if(numCols==2) no errors
n1 = StringFromList?(1, S_waveNames ,";" )
Duplicate/O $("root:"+n1), errorTmp
errorTmp = 0.01*(errorTmp)+ 0.03*sqrt(errorTmp)
S_waveNames+="errorTmp;"
numCols=3
endif
if(numCols==3) simple 3-column data with no resolution information
....
The error calculation is purely arbitrary, but provides something for the rest od the code to be happy.
Change History (2)
comment:1 Changed 14 years ago by srkline
comment:2 Changed 14 years ago by srkline
- Resolution set to fixed
- Status changed from new to closed
done
Note: See
TracTickets for help on using
tickets.
(2) If you are using just the analysis package, that looks to be the only place to change. Any of the other panels that (re)load data like the invariant, all call A_LoadOneDDataWithName()
If you are adding in the SANS or USANS reduction packages, then they are separate files. In the SANS Reduction, there is a file named PlotUtils?.ipf that has a function LoadOneDDataWithName(), where you can make exactly the same change. And I see in the USANS reduction, there are two nearly identical functions in PlotUtils_USANS.ipf, both U_LoadOneDData() and U_LoadOneDDataWithName() that need the fix. Ideally the two functions will be consolidated.
I'll incorporate into our code so that 2-column data won't crash things. I've used similar constructs to "fake" error on model data sets, so I agree with what you're doing.
-Steve