Skip to content

Conversation

Sandalas98
Copy link
Collaborator

Image retrival code, for FRQI first.

@Sandalas98 Sandalas98 changed the title Image retrieve.py Image retrieve functions Mar 4, 2025
geqie/cli.py Outdated
@@ -52,6 +52,13 @@ def _get_encoding_functions(params: Dict):
return EncodingFunctions(init_function, data_function, map_function)


def _get_retrive_functions(params: Dict):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def _get_retrive_functions(params: Dict):
def _get_retrive_function(params: Dict):

geqie/cli.py Outdated
@@ -89,6 +96,15 @@ def wrapper(*args, **kwargs):
return wrapper


def retrieving_options(func):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def retrieving_options(func):
def retrive_options(func):

geqie/cli.py Outdated
# print(f'Params: {params}')
print(f'Params.get("result"): {params.get("result")}')

retrieve_fun = _get_retrive_functions(params)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
retrieve_fun = _get_retrive_functions(params)
retrieve_function = _get_retrive_function(params)

geqie/cli.py Outdated
@retrieving_options
def retrieve(**params):
print('Retrieve CLI')
# print(f'Params: {params}')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove the unnecessary comments?


reconstructed_image = ones / total
try:
reconstructed_image = np.where(total > 0, ones / total, 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this try-except? I think we should just pad with zeros where NaN occurs, but I'm not sure how this behaves

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants