Skip to content

Commit

Permalink
parsing fiber units
Browse files Browse the repository at this point in the history
  • Loading branch information
Edgar Gutierrez Fernandez committed Nov 5, 2024
1 parent 756627c commit 2c7eac9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/pyFAI/integrator/fiber.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,20 @@ def sample_orientation(self):

def parse_units(self, unit_ip, unit_oop, incident_angle=None, tilt_angle=None, sample_orientation=None):
if unit_ip is None:
unit_ip = units.get_unit_fiber("qip_nm^-1")
unit_ip = units.get_unit_fiber(name="qip_nm^-1")
elif isinstance(unit_ip, str):
unit_ip = units.get_unit_fiber(name=unit_ip)
elif isinstance(unit_ip, units.UnitFiber):
...
else:
unit_ip = units.to_unit(unit_ip)

if unit_oop is None:
unit_oop = units.get_unit_fiber("qoop_nm^-1")
unit_oop = units.get_unit_fiber(name="qoop_nm^-1")
elif isinstance(unit_oop, str):
unit_oop = units.get_unit_fiber(name=unit_oop)
elif isinstance(unit_oop, units.UnitFiber):
...
else:
unit_oop = units.to_unit(unit_oop)

Expand Down

0 comments on commit 2c7eac9

Please sign in to comment.