lalsimulation waveform approximant number
@gabriele-vedovato and I found a bug in lalsimulation while discussing the PE results of an O3 event. In the posterior_samples.dat file for that event, the waveform lal_approximant value was recorded as 71. The actual approximant used was IMRPhenomPv2 as shown in the .init file. I found that different versions of lalsuite correspond to different values for the same approximant. For example, in lalsuite-v6.53 IMRPhenomPv2 is 71 and in lalsuite-v6.54 it is 72. However, in lalsuite-v6.54 the number 71 is IMRPhenomP. This can cause errors when people use the numbered values to trace or make use of the approximants.
Is it better to have fixed assigned numbered values to the approximants?
I asked in ligo email list and @adam-mercer replied that "I believe that is the expected behaviour, you shouldn't use the numbers as they can change. If you use the string instead it'll use the correct value for the version of LALSuite it's using. Approxmients get added and removed so using the number instead of the string could lead to imcompatibilities."
However, is it better to have some behavior like PyPi version control that re-uploading a new file with the same version number is not allowed. Similarly for lalsimulation, to have a fixed number-approximant relation, and if the approximant is removed, the number cannot be recycled either. We are not short of integers!
However again, I do not know what incompatibilities this could cause.