-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add useful printouts to CLI #10
base: main
Are you sure you want to change the base?
Conversation
src/transformer.py
Outdated
@@ -76,6 +76,14 @@ def analyze_and_offset_measurements(self, measurements: list[Measurement]): | |||
self.points_offset_x = points_offset_x | |||
self.points_offset_y = points_offset_y | |||
|
|||
print(f'SCALING') | |||
x_equivalent = self.grid_config['num_x_tiny_blocks_per_block'] / factor_x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think, this formula is correct. I think, it should be x_equivalent = 1/scale_x
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good catch, that's correct, I just fixed it.
src/drawer.py
Outdated
@@ -103,7 +103,7 @@ def _draw_datapoint(self, m: Measurement): | |||
|
|||
def _draw_vertical_axis_number(self, num_grid): | |||
num_data = self.trafo.grid_coord_to_data_label(num_grid, Axis.VERTICAL) | |||
label = f'{num_data:.2e}' | |||
label = f'{num_data:.2f}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, this isn't necessarily a good idea as the values can get very large or very small. The user should at least have the possibility to enable scientific notation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I reverted this change as this has nothing to do with adding CLI print output.
Preview
For reviewers
🙌
is working fine in your console.