-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
implements stara #195
base: main
Are you sure you want to change the base?
implements stara #195
Conversation
pre-commit.ci autofix |
Co-authored-by: Nabil Freij <nabil.freij@gmail.com>
It would be better to run the pre commit locally before you commit the changes. |
The issue is that the pre-commit on running locally is changing files which I didn't even touch |
What files? |
Files like, granule.py, radial.py and their corresponding test files. |
What did it change? |
It changed the import order within all of these files. Specifically the position of |
Can you see if that works with stara? |
This (128*128) one particularly has some issue with the stara. The error is |
What is the full trace back? |
|
Can you check if its 256 by 256 or 512 by 512? Is the code only going to work if its 4k by 4k? |
It works if its anything >= 256 by 256 pixels. |
Should a comment to the function about this. So how large is the HMI image if its 256 by 256? Could we store the 128 by 128 file and then just upscale it? |
Comment like "the data array provided to the stara should be larger than 128*128 pixels" ?
523KB
This is really great idea, it works! Only issue with 128 by 128 pixels now would be the size of it (138KB). But we could still create 64 by 64 (which would be around 42KB)and then upsample it. Tried this, it works too. |
That works.
That is too large.
How does the 64 by 64 one look and how does it look upscaled? I am very curious. |
Those look really rough but as long as they work! |
Could the data be a FITS file instead? |
"car_rot": 2284, | ||
} | ||
|
||
return sunpy.map.GenericMap(data, header) |
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.
Can this file not be saved as a file via Maps save function?
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.
it can be saved
yeah it can be but I thought we agreed to create a test case and not a fits file when discussed due to issues with size? |
I want to avoid a large file for sure. How large would this be? |
assert isinstance(result, np.ndarray) | ||
assert result.shape == hmi_upscaled.data.shape | ||
total_true_value_count = np.array(result) | ||
assert total_true_value_count.sum() == 5516 |
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 weird since when I run this on my local machine this test passes.
This test is actually counting the total number of True values in the 2D array result
.
Its really small, 5.6 KB |
So we got two choices: Check in the fits file since it's tiny. Or Move the array data into a text file that is read by the fixture to create the map. |
I would prefer the first way but would that(fits file) reside in sunpy's test folder or in sunkit-image? |
Assuming we have the infrastructure setup, I would prefer it in this repo. |
PR Description
This PR Implements the STARA algorithm (#37) based upon @Cadair's implementation.
Example way of using stara [Old]:
Outputs:
Currently understanding figure tests, will add in due time. Till then suggestions are requested.