-
Notifications
You must be signed in to change notification settings - Fork 21
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
459 residuals plotting options #483
459 residuals plotting options #483
Conversation
…ctor for plotting...
…siduals-plotting-options
… in ProjectionTool
…siduals-plotting-options
I will make an independent chi square calculator in Signal ! Wait until merging |
Now closes #90 |
It is good to go now, can someone review this ? |
…/xpsi into 459-residuals-plotting-options
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 will have a look at it, this is a bit weird indeed |
Seems like something that changed this yrange has occured already outside of this branch. In the online pages (https://xpsi-group.github.io/xpsi/Post-processing.html) the figure looks still normal, but when I ran the PostProcessing notebook in another branch that is up-to-date with the main, I get this same weird yrange. |
Then perhaps we can ignore this very minor issue and close this PR. |
…siduals-plotting-options
So before merging make a non-urgent issue to address the weird y-range at some point? |
I created #495 to remember to make the fix later. |
This is because the samples used for residuals are not the same. Basically you draw 100 different samples for each, which are different for each. If you use same |
Closes #496 |
xpsi/utilities/ProjectionTool.py
Outdated
if ('-' in model) and (not('-S' in model) and not('-U' in model) and not('-Ua' in model)): | ||
print (r"ERROR: model not recognised. If model has derived quantities and does not fall into the categories mentioned below: transform your dictionary to match \"-U\" requirements. Recognised hot spot names are \"ST\", \"\PST\", \"\CST\", \"EST\", \"PDT\", \"CDT\", \"EDT\"; for two hot spot model connect each hot spot model with \" \" (first for primary; second for secondary). If the two hot spots have the same name, add \"-S\" (if all the secondary hot spot is antipodal and its temperature and radius is the same of the primary); \"-U\" if the properties of the secondary spot is completely unrelated to the primary ones; \"-Ua\" if the secondary hot spot is antipodal to the primary but has independent radius and temperature.") | ||
print ("ERROR: model not recognised. If model has derived quantities and does not fall into the categories mentioned below: transform your dictionary to match \"-U\" requirements. Recognised hot spot names are \"ST\", \"\PST\", \"\CST\", \"EST\", \"PDT\", \"CDT\", \"EDT\"; for two hot spot model connect each hot spot model with \" \" (first for primary; second for secondary). If the two hot spots have the same name, add \"-S\" (if all the secondary hot spot is antipodal and its temperature and radius is the same of the primary); \"-U\" if the properties of the secondary spot is completely unrelated to the primary ones; \"-Ua\" if the secondary hot spot is antipodal to the primary but has independent radius and temperature.") |
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.
Why did you remove the letter "r" from here? There should be "r" so that it won't give a SyntaxWarning, since having a string that has backslashes?
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 added the "r" now back.
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.
Sorry I did not remove it, I guess it was already not in the original branch when I pulled to create this one
@@ -293,7 372,7 @@ def _add_data(self): | |||
|
|||
data = self._ax_data.pcolormesh(self._signal.data.phases, | |||
channel_edges, | |||
self._signal.data.counts/2.0, |
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.
Since not dividing with 2 anymore, should the title in the plots change from counts
to counts/cycles
? This change means also that the old X-PSI signal plots will not look the same anymore if produced using the same script. Maybe that is at least worth to mention in the tutorial or in the Changelog?
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.
Agreed, 'counts/cycle' (well actually it's counts per bin per cycle I guess)? and agreed we should mention this explicitly in the Changelog
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.
Yeah, I guess it is maybe counts / (bin / cycles)... if you count all the bins within all the shown cycles. But I am not sure what is best/correct. Would be just good to be clear that this has changed.
More plotting options including :
Choice of a parameter for the plots using postprocessor (instead of random samples)
Bolometric pulse : data and model along with chi square
Blurring the residuals for better visualisation
Add sin_inclination to be used in ProjectionTool of required
PostProcessing notebook modified too
May close #90
Closes #459