-
Notifications
You must be signed in to change notification settings - Fork 9
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
Import example chamber data #404
Conversation
|
@ngmahfouz part 1 of chamber analysis done. |
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.
Looks good! Thanks! I left some minor comments, but we can address them later. Thanks for adding the tests :)
Two more general thoughts for later:
- We probably should make use of pandas or xarray for these time analyses at some point in the future; we can assess later
- We should likely a plotting class or functionality at some point as well
particula/data/tests/example_data/chamber_data/stream_settings_smps_1d.json
Show resolved
Hide resolved
me too. I just asked gpt, and numpy only will auto add the dim to the left. "For example, if you have a 2D array A with shape (3,4) and you want to multiply it by a 1D array B with shape (4,), NumPy will automatically broadcast B to have a shape of (1,4), and then stretch it to match the shape of A for the multiplication." If A has a shape of (3, 50) and B has a shape of (3,), NumPy broadcasting will not be able to automatically align and broadcast these arrays for element-wise operations like multiplication, because their dimensions do not align properly according to the broadcasting rules. In broadcasting, the trailing dimensions of the arrays are compared, and one of the dimensions has to be 1 for broadcasting to occur. In this case: A has a shape of (3, 50). (3, 50) To perform element-wise multiplication between A and B, you would need to reshape B so that it has a compatible shape. For instance, if you want to multiply each row of A by B, you can reshape B to have a shape of (3, 1). |
Fixes #403