xpsi-group / xpsi

X-PSI: X-ray Pulse Simulation and Inference
Other
34 stars 20 forks source link

Forcing synthetic data creation when calling synthesise function #333

Closed thjsal closed 1 year ago

thjsal commented 1 year ago

I removed the lines if not self.externally_updated: # do not safely assume already handled and if self.needs_update or force: from the synthesise function of Likelihood.py to not allow the function just skip the synthetic data production if it thinks that parameters are unchanged or already externally provided, even though they are not. The parameter vector is a mandatory argument for this function, so it would be confusing not to use it.

After this fix, synthetic data can be created even if having set externally_updated=True for the likelihood object. In addition, the parameter values should not become None anymore when checking if they are within the bounds.