Skip to content

Commit

Permalink
Use absolute value for amplitude, FWHM and height errors
Browse files Browse the repository at this point in the history
  • Loading branch information
robertapplin committed Sep 17, 2024
1 parent b3c23aa commit 503801e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -759,12 +759,12 @@ def _read_ql_file(self, file_name, nl):
# SIGIK
line = next(line_pointer)
amp = AMAX * math.sqrt(math.fabs(line[0]) + 1.0e-20)
block_amplitude_e.append(amp)
block_amplitude_e.append(abs(amp))

# SIGFK
line = next(line_pointer)
FWHM = 2.0 * HWHM * math.sqrt(math.fabs(line[0]) + 1.0e-20)
block_FWHM_e.append(FWHM)
block_FWHM_e.append(abs(FWHM))

# append data from block
amp_data.append(block_amplitude)
Expand All @@ -774,7 +774,7 @@ def _read_ql_file(self, file_name, nl):
# append error values from block
amp_error.append(block_amplitude_e)
FWHM_error.append(block_FWHM_e)
height_error.append(block_height_e)
height_error.append(abs(block_height_e))

return q_data, (amp_data, FWHM_data, height_data), (amp_error, FWHM_error, height_error)

Expand Down

0 comments on commit 503801e

Please sign in to comment.