imgmarker package

Subpackages

Submodules

imgmarker.config module

Copyright © 2025, UChicago Argonne, LLC

Full license found at _YOUR_INSTALLATION_DIRECTORY_/imgmarker/LICENSE

imgmarker.config.path()
imgmarker.config.read() Tuple[str, List[str], List[str], List[str], List[int]]

Reads in each line from {username}_config.txt. If there is no configuration file, a default configuration file will be created using the required text format.

Returns:
image_dir: str

Directory containing desired image files.

group_names: list[str]

A list of containing labels for each mark button.

category_names: list[str]

A list containing labels for each image category.

group_max: list[int]

A list containing the maximum allowed number of marks for each group.

imgmarker.config.update() None

Updates any of the config variables with the corresponding parameter.

imgmarker.io module

Copyright © 2025, UChicago Argonne, LLC

Full license found at _YOUR_INSTALLATION_DIRECTORY_/imgmarker/LICENSE

class imgmarker.io.FavoritesFile

Bases: object

Methods

read()

Takes data from favorites.csv and from them returns a list of image file names with full directory.

save(favorites, images)

Saves favorites data.

read() List[str]

Takes data from favorites.csv and from them returns a list of image file names with full directory.

Returns:
favorites: list[str]
save(favorites: List[str], images: List[Image])

Saves favorites data.

Parameters:
favorites: list[str]

A list of strings of each image file name from the specified image directory.

images: list[‘image.Image’]

A list of image objects.

Returns:
None
class imgmarker.io.ImagesFile

Bases: object

Methods

read()

Takes data from marks.csv and images.csv and from them returns a list of imgmarker.image.Image objects.

save(images)

Saves image data.

read() Tuple[List[Image], List[Mark]]

Takes data from marks.csv and images.csv and from them returns a list of imgmarker.image.Image objects.

Returns:
images: list[imgmarker.image.Image]
save(images: List[Image])

Saves image data.

Parameters:
images: list[`imgmarker.image.Image`]

A list of Image objects for each image from the specified image directory.

Returns:
None
class imgmarker.io.MarkFile(path: str)

Bases: object

Methods

read(images)

Takes data from marks.csv and images.csv and from them returns a list of imgmarker.image.Image objects.

save(images, imageless_marks)

Saves mark data.

isvalid

VALID_FIELDNAMES = ['date', 'image', 'group', 'label', 'x', 'y', 'ra', 'dec', 'sizesize(px)', 'size(arcsec)']
isvalid(return_err=False)
read(images: List[Image]) Tuple[List[Image], List[Mark]]

Takes data from marks.csv and images.csv and from them returns a list of imgmarker.image.Image objects.

Returns:
images: list[imgmarker.image.Image]
save(images: List[Image], imageless_marks: List[Mark]) None

Saves mark data.

Parameters:
images: list[`imgmarker.image.Image`]

A list of Image objects for each image from the specified image directory.

Returns:
None
imgmarker.io.glob(edited_images: List[Image] = []) Tuple[List[Image], int]

Globs in IMAGE_DIR, using edited_images to sort, with edited_images in order at the beginning of the list and the remaining unedited images in randomized order at the end of the list.

Parameters:
edited_images: list[‘imgmarker.image.Image’]

A list of Image objects containing the loaded-in information for each edited image.

Returns:
images: list[‘imgmarker.image.Image’]

A list of Image objects with the ordered edited images first and randomized unedited images added afterwards.

idx: int

The index to start at to not show already-edited images from a previous save.

imgmarker.io.markpaths() List[str]

imgmarker.tests module

Module contents

imgmarker.resource_path(resource)