Changeset a01af35 in sasview for src/sas/sascalc/dataloader/readers/sesans_reader.py
- Timestamp:
- Nov 13, 2016 8:04:05 AM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 55db501, a5b8253
- Parents:
- f5e226c9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/sesans_reader.py
r392056d ra01af35 59 59 raise RuntimeError, "sesans_reader: cannot open %s" % path 60 60 buff = input_f.read() 61 # print buff62 61 lines = buff.splitlines() 63 # print lines64 #Jae could not find python universal line spliter:65 #keep the below for now66 # some ascii data has \r line separator,67 # try it when the data is on only one long line68 # if len(lines) < 2 :69 # lines = buff.split('\r')70 71 62 x = numpy.zeros(0) 72 63 y = numpy.zeros(0) … … 83 74 tdlam = numpy.zeros(0) 84 75 tdx = numpy.zeros(0) 85 # print "all good"86 76 output = Data1D(x=x, y=y, lam=lam, dy=dy, dx=dx, dlam=dlam, isSesans=True ) 87 # print output88 77 self.filename = output.filename = basename 89 78 90 # #Initialize counters for data lines and header lines.91 # is_data = False # Has more than 5 lines92 # # More than "5" lines of data is considered as actual93 # # data unless that is the only data94 # mum_data_lines = 595 # # To count # of current data candidate lines96 # i = -197 # # To count total # of previous data candidate lines98 # i1 = -199 # # To count # of header lines100 # j = -1101 # # Helps to count # of header lines102 # j1 = -1103 # #minimum required number of columns of data; ( <= 4).104 # lentoks = 2105 79 paramnames=[] 106 80 paramvals=[] … … 111 85 Pvals=[] 112 86 dPvals=[] 113 # print x114 # print zvals115 87 for line in lines: 116 88 # Initial try for CSV (split on ,) … … 121 93 paramvals.append(toks[1]) 122 94 if len(toks)>5: 123 #zvals.append(toks[0])124 #dzvals.append(toks[1])125 #lamvals.append(toks[2])126 #dlamvals.append(toks[3])127 #Pvals.append(toks[4])128 #dPvals.append(toks[5])129 130 95 zvals.append(toks[0]) 131 96 dzvals.append(toks[3])
Note: See TracChangeset
for help on using the changeset viewer.