-
Notifications
You must be signed in to change notification settings - Fork 20
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
enhance pixel_plot #21
base: main
Are you sure you want to change the base?
Conversation
Changed 1 to hello
…o pixel-plot-ni
…o pixel-plot-ni
…o pixel-plot-ni
the hover update is not working yet
Also added a documentation at some parts.
…o pixel-plot-ni
The plots look amazing great work @lukasgraf-internship and @nicHoch |
Codecov Report
@@ Coverage Diff @@
## master #21 +/- ##
===========================================
- Coverage 67.41% 54.29% -13.12%
===========================================
Files 9 9
Lines 672 838 +166
===========================================
+ Hits 453 455 +2
- Misses 219 383 +164
Continue to review full report at Codecov.
|
This is fantastic thanks for the great work! Some small things that could maybe be improved there a a lot of magic numbers in the code but I guess this can't really be avoided with the plots maybe just some more comments to say why or how they were obtained. Also I notice in the doc built here (https://stixpy--21.org.readthedocs.build/en/21/code_ref/science.html) |
.gitignore
Outdated
/Minergie Test Data/ | ||
/Matplotlib Practice/ |
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.
would be better to keep this outside of .gitignore
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.
already removed
quadrant_font = {'weight': 'regular', 'size': 15} | ||
|
||
if cmap is None: | ||
clrmap = copy.copy(cm.get_cmap('viridis')) |
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.
is the copy.copy
really needed?
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.
otherwise we get "will deprecate" warning if we set the out of range color
xnorm = plt.Normalize(SubCollimatorConfig["SC Xcen"].min()*1.5, SubCollimatorConfig["SC Xcen"].max()*1.5) | ||
ynorm = plt.Normalize(SubCollimatorConfig["SC Ycen"].min()*1.4, SubCollimatorConfig["SC Ycen"].max()*1.4) |
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.
where do the 1.5 and 1.4 come from
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.
def det_config_plot(detector_config, axes, font, detector_id): | ||
""" Shows a plot with the configurations of the detectors; the config plot. """ | ||
# Create Functions to convert 'Front' and 'Rear Orient'. | ||
def mm2deg(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 these make sense - can you just convert mm to degrees like this?
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.
this is a work around as the twin axis approach does not work in this subplot (axes) approach.
so we show the degree and the mm on the same axis and therefor have to deal with the scaling on our own
detector_config['Front Pitch'], | ||
detector_config['Rear Pitch'], | ||
0, | ||
deg2mm(detector_config['Front Orient']), |
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.
The orientations are already in degree why try and convert, trying to get a component of the orientation or something?
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.
so above
provide different chart types for BSD pixel data
kind: 'pixels' plots all detectors and all pixel as colormap
kind: 'errorbar' plots all detectors and pixelsrows as line chart with errorbars
kind: 'config' plots the static config of all detectors (pitch, orientation ...)