On this line, the priors are read in every likelihood evaluation. This is bad for two reasons:
If a user changes the priors file during a run, the edited priors will be used in further likelihood evaluations, with no record of it being stored in the results directory.
It's just slow... There's no need to do millions of file read operations when you can use a tiny portion of memory.
To fix this, we should make it so that the priors are read in once and passed around to the necessary functions, like all other data. This may take some work to edit all the relevant files, so a temporary fix could be to read the priors file in the results directory. That version shouldn't be touched and fixes the first problem.
While this is being fixed, the priors should also be changed to be comma separated (rather than tab), for readability and consistency with other files.
I'm assigning myself to this and will fix soon. Just wanted to make this visible to the rest of the MultiMoon collaboration.
https://github.com/dragozzine/multimoon/blob/b4a5f2605688beca04bb80f20f797748684b9a87/src/mm_likelihood.py#L108
On this line, the priors are read in every likelihood evaluation. This is bad for two reasons:
To fix this, we should make it so that the priors are read in once and passed around to the necessary functions, like all other data. This may take some work to edit all the relevant files, so a temporary fix could be to read the priors file in the results directory. That version shouldn't be touched and fixes the first problem.
While this is being fixed, the priors should also be changed to be comma separated (rather than tab), for readability and consistency with other files.
I'm assigning myself to this and will fix soon. Just wanted to make this visible to the rest of the MultiMoon collaboration.