Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 05 07:38

    StanczakDominik on master

    `hypothesis` tests; numba-based… (compare)

  • May 04 19:27

    StanczakDominik on master

    Pickleable particles (#1122) (compare)

  • May 04 19:27
    StanczakDominik closed #1011
  • May 04 09:52
    StanczakDominik edited #1133
  • May 04 09:52
    StanczakDominik edited #1133
  • May 04 09:46
    StanczakDominik edited #1133
  • May 04 09:45
    StanczakDominik assigned #1133
  • May 04 09:45
    StanczakDominik edited #1133
  • May 04 09:45
    StanczakDominik edited #1133
  • May 04 09:45
    StanczakDominik opened #1133
  • May 04 06:45
    falcon98 opened #1132
  • May 04 03:52

    StanczakDominik on pre-commit-ci-update-config

    (compare)

  • May 04 03:52

    StanczakDominik on master

    [pre-commit.ci] pre-commit auto… (compare)

  • May 03 16:48

    pre-commit-ci[bot] on pre-commit-ci-update-config

    [pre-commit.ci] pre-commit auto… (compare)

  • May 03 08:02
    StanczakDominik milestoned #1130
  • May 02 09:04
    StanczakDominik milestoned #1129
  • May 02 09:03
    StanczakDominik assigned #1129
  • May 02 09:03
    StanczakDominik opened #1129
  • May 01 16:08

    StanczakDominik on master

    Minor CI refactor (#1128) * Ad… (compare)

  • May 01 06:27

    StanczakDominik on master

    Enable flake8 checks (#1127) *… (compare)

Dominik Stańczak
@StanczakDominik:matrix.org
[m]
Hope you get bettter soon!
You didn't miss much; we did make a bunch of progress on closing old PRs, though, so that was pretty productive.
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
Hey Nick Murphy, a question. Would you say that there are places where Particles should be mutable? What about CustomParticles? IonizationState objects?
Nick Murphy
@namurphy:matrix.org
[m]
Good question! That's one that I've been wondering about too. Regular Particle objects should be immutable. There might be some use cases where CustomParticle objects should be mutable...like for a dust grain in the interstellar medium that accretes or ejects electrons. I don't know how often that would come up. IonizationState stuff should be mutable for cases of time-dependent non-equilibrium ionization (i.e. a plasma that starts out cool and then gets heated more quickly than ionization can keep up with).
I've been wondering if Particle should be a dataclass. CustomParticle and DimensionlessParticle too.
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
Well, you nailed the point of the question, there :)
Nick Murphy
@namurphy:matrix.org
[m]
I thought I had raised an issue about turning Particle into a dataclass, but it turned out it was just a dream, and GitHub doesn't have a dream API.
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
I'd be in favor of immutability for CustomParticle as well; if it's ever needed needed for time-dependent stuff, we can make a custom object for that
Nick Murphy
@namurphy:matrix.org
[m]
Making CustomParticle immutable does sound reasonable to me. Right now it's mutable.
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
Sounds just right for the dataclass refactor, then!
I'm asking because I've had a few ideas for IonizationState's (and IonicLevel's) immutability after falling down a rabbit hole on hashability. Basically, if you want something to be hashable (thus, be a dict key), you should keep it immutable. I'm sidestepping the issue by using the ionic symbol as a key for now.
Nick Murphy
@namurphy:matrix.org
[m]
To me it seems reasonable to have IonizationState be mutable since that's something that often ends up changing over time.
Come to think of it...we might start thinking of immutability and mutability in terms of whether it makes sense physically.
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
Yeah, that sounds reasonable enough - unless you represented a series of time snapshots by a bunch of IonizationState objects.
Nick Murphy
@namurphy:matrix.org
[m]
Yeah, that would be another possibility. Hm...
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
Well, it's not something I'm suggesting we change overnight :D
Nick Murphy
@namurphy:matrix.org
[m]
True!
Oh wait I mean True!
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
yes
Nick Murphy
@namurphy:matrix.org
[m]
Changing CustomParticle to be immutable would be a good first step. I'll create an issue on that right now.
Particle is hashable, it's set up to have the same hash as the particle symbol too.
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
Makes sense!
Nick Murphy
@namurphy:matrix.org
[m]
Yep I totally did it because it makes sense and not because I was having too much fun with Python
Would making CustomParticle immutable have advantages when using, say, Numba?
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
Probably not ☹️
At least not AFAIK
I was thinking about Peter's issue with particles and scipy optimize
I have no idea whether immutability would help out with that, though
Nick Murphy
@namurphy:matrix.org
[m]
It'd be worth giving some more thought to whether or not there are other use cases for keeping them mutable. I can't think of many at the moment...which could either be because there aren't many cases, or because of pandemic brain.
And also — thank you for bringing this up! This has also been in the back of my mind lately too.
Dominik Stańczak
@StanczakDominik:matrix.org
[m]

Another wacky IonizationState question! We can currently do something like this:

all_species = IonizationStateCollection(
    {
        "H": [0, 1],
        "C": [0, 0, 0, 0, 0, 0, 1],
    },
    n0=1e20 * u.m ** -3,
    abundances={"H": 1, "C": 0.08},
    T_e=10 * u.eV,
)

And that represents, well, a blob. But... suppose we could put arrays in? Even 1D arrays would be pretty helpful for my usage. I'm going to need 1D profiles (for each flux surface) of each ion's density and temperature for thesis purposes. I could either stick the 1D arrays in IonizationState or I could build each IonizationState from 1D arrays of parameters in a for loop. Of course, the issue then is that I'm looping at the pure python level.

Dominik Stańczak
@StanczakDominik:matrix.org
[m]
We can now use https://www.plasmapy.org/chat to link back to this room. Idea lifted with love from the sunnier side of python. ;)
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
Probably a good idea to also add https://www.plasmapy.org/jitsi while I'm at it! Does anyone have any more redirect suggestions?
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
Here's a reminder that we've got our weekly community meeting in 40min from now, on https://plasmapy.org/jitsi and with the minutes over at https://hackmd.io/@plasmapy/BJSrFenUd :)
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
:point_up: Edit: Here's a reminder that we've got our weekly community meeting in 40min from now, on https://www.plasmapy.org/jitsi and with the minutes over at https://hackmd.io/@plasmapy/BJSrFenUd :)
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
#1122, the worst kind of bugfix, where things work and I have no clue why.
Github
@_neb_github:matrix.org
[m]
PlasmaPy/PlasmaPy#1122 : Pickleable particles
Nick Murphy
@namurphy:matrix.org
[m]
We're having problems with Jitsi so we're going to the office hours zoom backup room for today's meeting now
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
I just found out about https://cherab.github.io/documentation/welcome.html and this looks very, very, very relevant.
StanczakDominik
@StanczakDominik:matrix.org
[m]
Ping Julien Hillairet , the above looks particularly interesting for you given your recent question about accessing atomic data
Dominik Stańczak
@StanczakDominik:matrix.org
[m]
Also ping Lemmatum about the above, for spectroscopic reasons