Closed mkruckow closed 1 month ago
To clean up the input string options, can we use either .lower()
or .casefold()
, see SO link: https://stackoverflow.com/questions/319426/how-do-i-do-a-case-insensitive-string-comparison
To clean up the input string options, can we use either
.lower()
or.casefold()
, see SO link: https://stackoverflow.com/questions/319426/how-do-i-do-a-case-insensitive-string-comparison
I have made the change to use those functions to shorten the lists. Should we get an own function, which removes dashes, underscores and spaces to shorten it even more?
A bit late to this PR, but this functionality is already there in the binarypopulation.py
, where you can read and evolve binaries from an hdf5 file. That function is not optimised for reading the binaries from the file, but works correctly in evolving the binaries using custom initial ZAMS value.
I'm not sure what the added benefit of two frameworks for the same thing is. Is it possible to combine the two in some way or is there additional functionality here that is missing in the other?
A bit late to this PR, but this functionality is already there in the
binarypopulation.py
, where you can read and evolve binaries from an hdf5 file. That function is not optimised for reading the binaries from the file, but works correctly in evolving the binaries using custom initial ZAMS value.I'm not sure what the added benefit of two frameworks for the same thing is. Is it possible to combine the two in some way or is there additional functionality here that is missing in the other?
The from_hdf
function is aimed to read in from an existing population file. Usually, you'd even use it to read in the evolution not just ZAMS values. Any hdf5 file read by this function needs to be formatted in the POSYDON way, hence having all columns named as POSYDON would name them. Additionally, I'm not sure whether it will work well, if the load is specified in the population_params.ini
(surely the default version doesn't include value, which you'd need to change). Using the from_hdf
at least requires a two step process from a user.
So, additional functionality here is:
population_params.ini
Additional functionality of from_hdf
:
@maxbriel, maybe we can add the option to switch to the from_hdf
in case the given file has an h5
file extension in an new PR?
Add the functionality to be able to read the initial binary values from a given file.
population_params_default.ini
to take a file name, if empty data will be randomly generated as beforeZAMS_values.csv
, see belowZAMS_values.csv
content: