Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
jurjen93 committed Feb 12, 2024
1 parent adfbc23 commit 0d15f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source_selection/pre_processing_for_ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ def transform_data(image_data):
"""
while image_data.ndim > 2:
image_data = image_data[0]
rms = get_rms(image_data)
norm = SymLogNorm(linthresh=rms * 2, linscale=2, vmin=-rms, vmax=rms*50000, base=10)

# crop data (half data size)
image_data = crop(image_data)

# re-normalize data (such that values are between 0 and 1)
rms = get_rms(image_data)
norm = SymLogNorm(linthresh=rms * 2, linscale=2, vmin=-rms, vmax=rms*50000, base=10)
image_data = norm(image_data)
image_data = np.clip(image_data - image_data.min(), a_min=0, a_max=1)

Expand Down

0 comments on commit 0d15f31

Please sign in to comment.