-
Notifications
You must be signed in to change notification settings - Fork 33
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
Jonas cutthrough timeseries script #224
base: master
Are you sure you want to change the base?
Conversation
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 function could be simplified at little cost by converting many of the positional arguments into keyword arguments. This would follow the approach taken in other analysator plotting routines, like plot_colormap3d()
some suggested defaults:
bulkpath='./'
bulkprefix='bulk'
outputname='cutthrough_timeseries.png',
outputdir='./',
intpol=False,
filt=0,
op=None,
cmap='plasma',
I changed the command line argument handling to use argparse instead of sys.argv, so now there are proper defaults and optional arguments. |
This has been tested by the way. |
scripts/cutthrough_timeseries.py
Outdated
fnr0: First file number to plot | ||
fnr1: Last file number to plot | ||
dr: Distance between cut-through sample points (km) | ||
pointfile: File containing a list of coordinates, in Re |
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.
how many? Which ordering of X,Y,Z and points?
What are the default values?
I'm sorry but a "cut through" function implies some cut along spatial space. This now takes a list of points (From a file!?! What do we do, live in the dark ages?) and plonks those values in the plot array, but the "spatial" axis isn't a proper axis as it's just a list of points. Having a starting point and an end point and doing a cut between those two positions (using one of the existing cut through functions) would be much preferred. |
I have to respectfully disagree with some of these points (no pun intended). Reading in the list of coordinates from a file is easier in this case when the script is intended to be run directly from the command line. And continuing with that line of reasoning, this script is intended as an auxiliary tool only that can be run as is. As for using an arbitrary list of points instead of a cut, this functionality is useful for cases where you want to e.g. plot along a field line or some other non-analytic curve. However, I can change the name of the script and the functions to reflect that this is not a "straight cut". If I was integrating a function directly into Analysator (like a plot_cutthrough function or something), then I would certainly use the existing cut through functions and implement the straight cut through first. Do let me know if you think that is what I should be doing instead. |
Ok I will write a more generic function that takes reasonable non-file input when I have time. (Battarbee & Suni, private communication, 2024) |
Quick notes:
This is to be done between now and Jonas' defense. |
Usable and tested script for making cutthrough timeseries (aka. time-elongation maps aka. keograms) with Vlasiator data.