asteca / ASteCA

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

Improve performance of synth cluster generation (5) #515

Closed Gabriel-p closed 4 months ago

Gabriel-p commented 3 years ago

Follow up on #227 #357 #445 #506

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.