zhafen / linefinder

A tool for finding and classifying the worldlines of Lagrangian parcels of mass, in the context of hydrodynamic simulations of galaxy formation.
https://zhafen.github.io/linefinder
MIT License
0 stars 1 forks source link

Putting data in fractional units is currently broken in many cases #62

Closed zhafen closed 6 years ago

zhafen commented 6 years ago

Originally reported by Zachary Hafen (Bitbucket: zhafen, GitHub: zhafen)


As an example of something we might want consider obtaining R(t_star)/Rstar0.5(t_star) in order to plot it. However, this currently isn't easily possible.


zhafen commented 6 years ago

Original comment by Zachary Hafen (Bitbucket: zhafen, GitHub: zhafen)


Fixed. I was multiplying the data by h^scaled_h_power, not the thing I'm scaling the data by.

zhafen commented 6 years ago

Original comment by Zachary Hafen (Bitbucket: zhafen, GitHub: zhafen)


This doesn't seem to be working yet, at least for physical coordinates. After selecting only particles outside the main galaxy, the following piece of code produces the resulting plot:

#!python

w_set.histogram(
  'R',
  fix_invalid = True,
  x_range = [0,10],
  bins = 10000,
  scale_key = 'Rstar0.5',
  scale_a_power = 1.,
  scale_h_power = -1.,
)

distance_to_main_galaxy.png

The minimum distance here should be 2, but instead it's 4. Something's wrong.

zhafen commented 6 years ago

Original comment by Zachary Hafen (Bitbucket: zhafen, GitHub: zhafen)


Resolved Issue #62!

zhafen commented 6 years ago

Original comment by Zachary Hafen (Bitbucket: zhafen, GitHub: zhafen)


Update for this: My full tracked data set goes over the entire set of snapshots, while the halo data does not. As such, I have to decide how to mesh the two.

zhafen commented 6 years ago

Original comment by Zachary Hafen (Bitbucket: zhafen, GitHub: zhafen)


In order to fix this I think I'll create TimeData.get_processed_data method that allows scaling by an arbitrary column of the merger tree halo data.