Skip to content

Commit

Permalink
Add explanation on image offset
Browse files Browse the repository at this point in the history
  • Loading branch information
lauraporta committed Nov 21, 2024
1 parent 06623d7 commit 4f12855
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions derotation/analysis/full_derotation_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def load_data(self):
logging.info(f"Dataset {self.filename_raw} loaded")
logging.info(f"Filename: {self.filename}")

# by default the center of rotation is the center of the image
self.center_of_rotation = (
self.num_lines_per_frame // 2,
self.num_lines_per_frame // 2,
Expand Down Expand Up @@ -862,6 +863,19 @@ def derotate_frames_line_by_line(self) -> np.ndarray:
def find_image_offset(img):
"""Find the "F0", also called "image offset" for a given image.
Explanations
------------
What is the image offset?
The PMT (photo-multiplier tube) adds an arbitrary offset to the
image that corresponds to 0 photons received. We can use a Gaussian
Mixture Model to find this offset by assuming that it will be the
smallest mean of the Gaussian components.
Why do we need to find it?
When we rotate the image, the pixels of the image that are not
sampled will be filled with the offset is order to correctly express
"0 photons received".
Parameters
----------
img : np.ndarray
Expand Down

0 comments on commit 4f12855

Please sign in to comment.