asteca / ASteCA

Code for the ASteCA package.
http://asteca.github.io/
MIT License
18 stars 6 forks source link

Improve performance of synthetic cluster generation (mass_interp) #542

Closed Gabriel-p closed 5 months ago

Gabriel-p commented 2 years ago

The mass_interp() function currently takes up most of the processing time for somewhat large maximum masses. The function interpolates the entire isoch_cut even though the next function (binarity()) discards the stars that are not single/binary systems depending on the selected binary systems.

The indexes for the selected binary systems depend on the mass_dist array exclusively, and could be obtained previous to the call to binarity(). Knowing these indexes we could interpolate the magnitude and color for the single systems without interpolating the binary system's magnitude & color, and similarly interpolate the binary magnitude & color for the binary systems without also interpolating the magnitude & color arrays for the single systems.

Not sure if this would improve the performance significantly.

Gabriel-p commented 5 months ago

Moved to #515