Skip to content

Commit

Permalink
Do not rescale the cartesian view
Browse files Browse the repository at this point in the history
We have been rescaling the cartesian view for quite a while, but
it does not actually appear to be necessary.

The pixel values from the raw view seem to be maintained when they
are transformed to the cartesian view. Rescaling the values in the
cartesian view is sometimes causing problems when there are, for
instance, very high and low values.

Signed-off-by: Patrick Avery <[email protected]>
  • Loading branch information
psavery committed Aug 3, 2023
1 parent ebbd675 commit bc3a0cc
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions hexrd/ui/calibration/cartesian_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,6 @@ def generate_image(self):

# In case there were any nans...
nan_mask = np.isnan(img)
img = np.ma.masked_array(img, mask=nan_mask, fill_value=0.)

# Rescale the data to match the scale of the original dataset
# TODO: try to get create_calibration_image to not rescale the
# result to be between 0 and 1 in the first place so this will
# not be necessary.
img = np.interp(img, (img.min(), img.max()), (self.min, self.max))

# Re-mask...
self.img = np.ma.masked_array(img, mask=nan_mask, fill_value=0.)

def update_images_dict(self):
Expand Down

0 comments on commit bc3a0cc

Please sign in to comment.