Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects

Updated load_1D.py

Merged usov_i requested to merge JakHolzer-edited-load_1D-vol2 into det1d

Created by: JakHolzer

Try, except deleted. Added one if/elif loop to tell apart zebra mode (bi, nb) and different angles saved

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
150 for position in range(num_of_points):
151 omega.append(float(data[position + 3].split()[1]))
152 counts.append(float(data[position + 3].split()[2]))
153 monitor1.append(float(data[position + 3].split()[3]))
154 monitor2.append(float(data[position + 3].split()[4]))
155 monitor3.append(float(data[position + 3].split()[5]))
156 time.append(float(data[position + 3].split()[6]))
157 det_variables["Measurements"]["omega"] = omega
158 det_variables["Measurements"]["counts"] = counts
159 det_variables["Measurements"]["Monitor1"] = monitor1
160 det_variables["Measurements"]["Monitor2"] = monitor2
161 det_variables["Measurements"]["Monitor3"] = monitor3
162 det_variables["Measurements"]["time"] = time
163 else:
164 print("Unknown file extention")
165 if all(decimal):
  • Author Owner

    Created by: ivan-usov

    Review: Changes requested

    I left a few comments, but not sure they didn't result in a review.

  • Author Owner

    Created by: ivan-usov

    Review: Approved

  • Author Owner

    Merged by: ivan-usov at 2020-09-15 12:25:25 UTC

  • Author Owner

    Created by: JakHolzer

    The reason is that the hkl are in ccl in float format even for hkl, they are for example -1.000 1.000 0.000, therefore they will be evaluated as floats, not integer if I'm not mistaken. The decimal checks if there are some numbers except zeros after decimal points which is only way how to separate hkl from real indices.

    pá 11. 9. 2020 v 14:07 odesílatel Ivan Usov notifications@github.com napsal:

    @JakHolzer https://github.com/JakHolzer , how about to use is_integer() (https://docs.python.org/3/library/stdtypes.html#float.is_integer) instead? I don't think that complicated logic with Decimal is needed.

    — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/paulscherrerinstitute/pyzebra/pull/5#issuecomment-691054453, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2BBRWB7B7CNYHZJWBNVRTSFIHGJANCNFSM4RFAMJOA .

  • Please register or sign in to reply
    Loading