Skip to content

Commit

Permalink
Merge pull request #27 from anananacr/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
anananacr authored May 21, 2024
2 parents 72796fb + aabe815 commit 3e23284
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ plots_info = {
"xlim_min": ...,
"xlim_max": ...,
"ylim_min": ...,
"ylim_max": ...
"ylim_max": ...,
"color_map": ...
}
```
To calculate the refined detector center of raw data frame as a numpy array using the following methods:
Expand Down
20 changes: 10 additions & 10 deletions bblib/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ def _run_centering(self, **kwargs) -> tuple:
ax1.imshow(
self.visual_data * self.mask_for_center_of_mass,
norm=LogNorm(),
cmap="spring",
cmap=self.plots_info["color_map"],
origin="lower",
)
else:
ax1.imshow(
self.visual_data * self.mask_for_center_of_mass,
norm=LogNorm(self.plots_info["value_min"], self.plots_info["value_max"]),
cmap="spring",
cmap=self.plots_info["color_map"],
origin="lower",
)
ax1.scatter(
Expand Down Expand Up @@ -274,14 +274,14 @@ def _run_centering(self, **kwargs) -> tuple:
self.visual_data * self.mask_for_circle_detection,
norm=LogNorm(),
origin="lower",
cmap="spring",
cmap=self.plots_info["color_map"],
)
else:
ax1.imshow(
self.visual_data * self.mask_for_circle_detection,
norm=LogNorm(self.plots_info["value_min"], self.plots_info["value_max"]),
origin="lower",
cmap="spring",
cmap=self.plots_info["color_map"],
)
ax1.scatter(
self.initial_detector_center[0],
Expand Down Expand Up @@ -562,14 +562,14 @@ def _run_centering(self, **kwargs) -> tuple:
self.visual_data * self.mask_for_fwhm_min,
norm=LogNorm(),
origin="lower",
cmap="spring",
cmap=self.plots_info["color_map"],
)
else:
ax1.imshow(
self.visual_data * self.mask_for_fwhm_min,
norm=LogNorm(self.plots_info["value_min"], self.plots_info["value_max"]),
origin="lower",
cmap="spring",
cmap=self.plots_info["color_map"],
)
ax1.scatter(
self.initial_detector_center[0],
Expand Down Expand Up @@ -802,11 +802,11 @@ def _run_centering(self, **kwargs) -> tuple:
fig, ax1 = plt.subplots(1, 1, figsize=(10, 10))
if self.plots_info["value_auto"]:
pos = ax1.imshow(
self.visual_data, norm=LogNorm(), cmap="spring", origin="lower"
self.visual_data, norm=LogNorm(), cmap=self.plots_info["color_map"], origin="lower"
)
else:
pos = ax1.imshow(
self.visual_data, norm=LogNorm(self.plots_info["value_min"], self.plots_info["value_max"]), cmap="spring", origin="lower"
self.visual_data, norm=LogNorm(self.plots_info["value_min"], self.plots_info["value_max"]), cmap=self.plots_info["color_map"], origin="lower"
)
ax1.scatter(
self.initial_detector_center[0],
Expand Down Expand Up @@ -874,11 +874,11 @@ def _run_centering(self, **kwargs) -> tuple:
fig, ax1 = plt.subplots(1, 1, figsize=(10, 10))
if self.plots_info["value_auto"]:
pos = ax1.imshow(
self.visual_data, norm=LogNorm(), cmap="spring", origin="lower"
self.visual_data, norm=LogNorm(), cmap=self.plots_info["color_map"], origin="lower"
)
else:
pos = ax1.imshow(
self.visual_data, norm=LogNorm(self.plots_info["value_min"], self.plots_info["value_max"]), cmap="spring", origin="lower"
self.visual_data, norm=LogNorm(self.plots_info["value_min"], self.plots_info["value_max"]), cmap=self.plots_info["color_map"], origin="lower"
)

ax1.scatter(
Expand Down

0 comments on commit 3e23284

Please sign in to comment.