Skip to content

Commit

Permalink
Merge pull request #171 from BrillouinMicroscopy/fix/noid/reference-s…
Browse files Browse the repository at this point in the history
…hifts

Only set shifts if setup has respective sample
  • Loading branch information
raimund-schluessler authored Nov 22, 2022
2 parents ca7806e + 2eaf4d9 commit 4c136eb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bmlab/models/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def set_temperature(self, temperature):
methanol_shift = self.brillouin_shift(
methanol_f(temperature), methanol_n)

self.calibration.shift_methanol = methanol_shift
self.calibration.shift_water = water_shift
self.calibration.set_shift_methanol(methanol_shift)
self.calibration.set_shift_water(water_shift)
self.calibration.update_calibration()

def brillouin_shift(self, v, n):
Expand Down Expand Up @@ -145,11 +145,13 @@ def __init__(self, num_brillouin_samples, shift_methanol=None,
self.update_calibration()

def set_shift_water(self, shift_water):
self.shift_water = shift_water
if self.shift_water is not None:
self.shift_water = shift_water
self.update_calibration()

def set_shift_methanol(self, shift_methanol):
self.shift_methanol = shift_methanol
if self.shift_methanol is not None:
self.shift_methanol = shift_methanol
self.update_calibration()

def update_calibration(self):
Expand Down

0 comments on commit 4c136eb

Please sign in to comment.