punchbowl.util#

Functions#

validate_image_is_square(→ None)

Check that the input array is square.

output_image_task(→ None)

Prefect task to write an image to disk.

load_image_task(→ ndcube.NDCube)

Prefect task to load data for processing.

average_datetime(→ datetime.datetime)

Compute average datetime from a list of datetimes.

Module Contents#

punchbowl.util.validate_image_is_square(image: numpy.ndarray) None#

Check that the input array is square.

punchbowl.util.output_image_task(data: ndcube.NDCube, output_filename: str) None#

Prefect task to write an image to disk.

Parameters:
  • data (PUNCHData) – data that is to be written

  • output_filename (str) – where to write the file out

Return type:

None

punchbowl.util.load_image_task(input_filename: str) ndcube.NDCube#

Prefect task to load data for processing.

Parameters:

input_filename (str) – path to file to load

Returns:

loaded version of the image

Return type:

PUNCHData

punchbowl.util.average_datetime(datetimes: list[datetime.datetime]) datetime.datetime#

Compute average datetime from a list of datetimes.