-
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
enhance pixel_plot #21
Open
nicHoch
wants to merge
21
commits into
TCDSolar:main
Choose a base branch
from
nicHoch:pixel-plot-ni
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
1e59a56
add plot tests
nicHoch fc2ece8
Update plottest.py
lukasgraf11 0cf5f29
add collimator reader
nicHoch 9c823c3
add collimator plot
nicHoch e70a932
Update .gitignore
lukasgraf11 b35350a
Merge branch 'pixel-plot-ni' of https://github.com/nicHoch/stixpy int…
lukasgraf11 c1ff99e
Update .gitignore
lukasgraf11 95091df
subplot position of pixel plot
nicHoch a681466
Merge branch 'pixel-plot-ni' of https://github.com/nicHoch/stixpy int…
nicHoch aeafa9d
minimal plottest from test and fido
nicHoch e27c8f8
Add pixel and config plot
lukasgraf11 66f82f2
Merge branch 'pixel-plot-ni' of https://github.com/nicHoch/stixpy int…
lukasgraf11 b794c0a
time and energy update
lukasgraf11 37abb3e
fix mouse annotations
nicHoch 7137600
separate errorbar plot
nicHoch e8cd036
labels on config plot
nicHoch 91414ad
Add a legend to config plot
lukasgraf11 f915440
update plottest
nicHoch 6471452
Merge branch 'pixel-plot-ni' of https://github.com/nicHoch/stixpy int…
nicHoch e12383c
cleanup
nicHoch 2c3428d
remove sample script for showing plots
nicHoch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from matplotlib import pyplot as plt | ||
from sunpy.net import Fido, attrs as a | ||
from sunpy.timeseries import TimeSeries | ||
from pathlib import Path | ||
|
||
from stixpy.net.client import STIXClient # Need to import to register with Fido | ||
from stixpy import timeseries # Need to import to register with timeseries | ||
from stixpy.science import ScienceData | ||
from stixcore.config.reader import read_subc_params | ||
from stixpy.data import test | ||
|
||
# Ok this look like an interesting event let look for some pixel data | ||
query = Fido.search(a.Time('2020-11-17T00:00', '2020-11-17T23:59'), a.Instrument.stix, a.stix.DataProduct.sci_xray_l1) | ||
query | ||
# Again the 2nd to last file seem to match the time range of interest | ||
pd_file = Fido.fetch(query[0]) | ||
pd = ScienceData.from_fits(pd_file[0]) | ||
print(pd_file[0]) | ||
|
||
# jsut printg the object gives a textual overview, pixel data support the same plot methods as | ||
# pd | ||
|
||
#l1 = ScienceData.from_fits(test.STIX_SCI_XRAY_L1) | ||
#l2 = ScienceData.from_fits(test.STIX_SCI_XRAY_L2) | ||
#l2.plot_pixels() | ||
|
||
# plot the pixel data as default "kind=pixels" | ||
pd.plot_pixels(energy_indices=[[1, 5], [5, 20], [20, 30]]) | ||
plt.show() | ||
|
||
# plot the pixel data as line chart with errorbars" | ||
pd.plot_pixels(kind='errorbar', energy_indices=[[1, 5], [5, 20], [20, 30]]) | ||
plt.show() | ||
|
||
# plot the detector configuration (independent on the actual pixeldata)" | ||
pd.plot_pixels(kind='config') | ||
plt.show() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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