dynamics-of-stellar-systems / dynamite

dynamics, age and metallicity indicators tracing evolution
MIT License
10 stars 1 forks source link

Improved data preparation #389

Closed maindlt closed 1 month ago

maindlt commented 1 month ago

Based on Julia's code, data_prep/generate_kin_input.py now implements reading NIFS kinematics with any number of GH moments. The features are:

Open question: So far, the only well-documented method in data_prep/generate_kin_input.py is read_kinematics_nifs(). Shall we go the extra mile and make the whole code prettier and better documented?

This has been tested with #GH=6 data (non public) and tutorial 1_data_prep_for_gauss_hermite to make sure CALIFA and ATLAD3D still work as expected.

Closes #303.

juliala2504 commented 1 month ago

Tested with non-public NIFS data with different number of gh moments. kinematic, bin and aperture file are created correctly. Although with 8 (or 10) moments there are 4 (2) empty subplots in the kinematic map bc 12 subplots are created automatically, see plot for 8 moments.

kinmaps_nifs_gh8.pdf

Tested different numbers ngh in create_kin_input(). Works well to restrict to the desired number in case there are more moments in the input file as needed. Also, error message if ngh is greater than in input file works.

maindlt commented 1 month ago

Many thanks for testing, @juliala2504 :-) The last commit should remove the empty axes from the empty subplots.

maindlt commented 1 month ago

Many thanks for your feedback, @juliala2504! I tested a last time with tutorial 1_data_prep_for_gauss_hermite and will merge into master and delete branch :-)