Skip to content

Commit

Permalink
split out steps and debug log them
Browse files Browse the repository at this point in the history
  • Loading branch information
sroet authored Oct 21, 2024
1 parent d5da801 commit 8a04a02
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/pytom_tm/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,20 @@ def generate_template_from_map(
).astype(np.float32)

logging.info("Convoluting volume with filter and then downsampling.")
return zoom(
irfftn(rfftn(input_map) * lpf, s=input_map.shape),
input_spacing / output_spacing,
)
logging.debug("starting with rfftn")
temp = rfftn(input_map)
logging.debug("applying filter")
temp = temp * lpf
logging.debug("inverting rfftn")
temp = itfftn(temp, s=input_map.shape)
logging.debug("zooming")
temp = zoom(temp, input_spacing / output_spacing)
logging.debug("done")
return temp
#return zoom(
# irfftn(rfftn(input_map) * lpf, s=input_map.shape),
# input_spacing / output_spacing,
#)


def phase_randomize_template(
Expand Down

0 comments on commit 8a04a02

Please sign in to comment.