You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current version calculate_fluxmodel_scaling_factors() method in the MultiSourceMultiDatasetLLHRatioAnalysis method the current implementation is a little misleading.
The input is mean_ns, which one could expect to be the the total ns fitted by that analysis, so a scalar. Now, the output would be he scaling factor needed so each source produces that mean_ns. But when you do stacking analysis, the natural mean_ns is the total number of neutrinos from all sources, therefore, the flux should be divided accordingly for each sources.
For example, if we have 2 sources and expect a total ns=10, with ns_1=8 events for source 1 and ns_2=2 for the second source, the scaling factors should be the ones giving the flux needed for 8 events for source 1 and 2 events for source 2.
For this, you need to first compute the expected mean_ns per source with the given weights.
This should be implemented directly in this function, rather than have to guess this is the correct input for ns.
The text was updated successfully, but these errors were encountered:
I don't understand what the exact issue is here. The documentation of the method is quite clear, what it expects and what it returns. The method calculates the different scaling factors for all sources. So I don't know what you mean with "This should be implemented directly in this function".
In the current version calculate_fluxmodel_scaling_factors() method in the MultiSourceMultiDatasetLLHRatioAnalysis method the current implementation is a little misleading.
skyllh/skyllh/core/analysis.py
Lines 1911 to 1959 in 6704ef9
The input is mean_ns, which one could expect to be the the total ns fitted by that analysis, so a scalar. Now, the output would be he scaling factor needed so each source produces that mean_ns. But when you do stacking analysis, the natural mean_ns is the total number of neutrinos from all sources, therefore, the flux should be divided accordingly for each sources.
For example, if we have 2 sources and expect a total ns=10, with ns_1=8 events for source 1 and ns_2=2 for the second source, the scaling factors should be the ones giving the flux needed for 8 events for source 1 and 2 events for source 2.
For this, you need to first compute the expected mean_ns per source with the given weights.
This should be implemented directly in this function, rather than have to guess this is the correct input for ns.
The text was updated successfully, but these errors were encountered: