NNPDF / nnusf

An open source machine learning framework that provides predictions for all-energy neutrino structure functions.
https://nnpdf.github.io/nnusf/
GNU General Public License v3.0
0 stars 0 forks source link

Collect various analyses plots #13

Closed Radonirinaunimi closed 1 year ago

Radonirinaunimi commented 2 years ago

Given that we are more or less ready to run a full fit with our machine learning framework, it would be good to collect here various plots: data vs Yadism (in order to make sure that the coefficients are correct), kinematics, covariance matrices, etc.

Radonirinaunimi commented 2 years ago

Results below were generated using 1d40aa7:


Kinematics:

kinematics


Combined covmat (Normalised):

total-norm


BEBCWA59_F2 (Normalised):

BEBCWA59_F2-norm

BEBCWA59_F3 (Normalised):

BEBCWA59_F3-norm

CCFR_F2 (Normalised):

CCFR_F2-norm

CCFR_F3 (Normalised):

CCFR_F3-norm

CDHSW_DXDYNUB (Normalised):

CDHSW_DXDYNUB-norm

CDHSW_DXDYNUU (Normalised):

CDHSW_DXDYNUU-norm

CDHSW_F2 (Normalised):

CDHSW_F2-norm

CDHSW_F3 (Normalised):

CDHSW_F3-norm

CDHSW_FW (Normalised):

CDHSW_FW-norm

CHARM_F2 (Normalised):

CHARM_F2-norm

CHARM_F3 (Normalised):

CHARM_F3-norm

CHARM_QBAR (Normalised):

CHARM_QBAR-norm

CHORUS_DXDYNUB (Normalised):

CHORUS_DXDYNUB-norm

CHORUS_DXDYNUU (Normalised):

CHORUS_DXDYNUU-norm

CHORUS_F2 (Normalised):

CHORUS_F2-norm

CHORUS_F3 (Normalised):

CHORUS_F3-norm

NUTEV_DXDYNUB (Normalised):

NUTEV_DXDYNUB-norm

NUTEV_DXDYNUU (Normalised):

NUTEV_DXDYNUU-norm

NUTEV_F2 (Normalised):

NUTEV_F2-norm

NUTEV_F3 (Normalised):

NUTEV_F3-norm

juanrojochacon commented 2 years ago

Thanks @Radonirinaunimi , the kinematic plot looks super nice! Maybe we can use log scale also for x axis? Clearly we have quite a bit of data points for low-Q, so we can count on a reliable extrapolation.

Question: do we impose right now any cut in W? If we want to restrict ourselves to inelastic scattering and avoid the resonance region we have to impose W > 1.8 GeV or what is equivalent W^2 > 3.25 GeV^2. How does the kin plot change with this restriction?

Radonirinaunimi commented 2 years ago

Thanks @Radonirinaunimi , the kinematic plot looks super nice! Maybe we can use log scale also for x axis? Clearly we have quite a bit of data points for low-Q, so we can count on a reliable extrapolation.

Yes, we do indeed have quite some points in the low-$Q^2$, so this is good news. Below is the plot with log scale in the $x$ axis.

kinematics

Question: do we impose right now any cut in W? If we want to restrict ourselves to inelastic scattering and avoid the resonance region we have to impose W > 1.8 GeV or what is equivalent W^2 > 3.25 GeV^2. How does the kin plot change with this restriction?

For the time being we do not impose a cut on $W$, but we indeed definitely should. We will implement this cut and will post here the updated kinematic plot.

alecandido commented 2 years ago

Ah @Radonirinaunimi, you can also select cuts directly from the CLI, there is also the help to show how :)

(not yet on W, just for x and Q2 for the time being, but in order to cut on W we only need to compute it)

Radonirinaunimi commented 2 years ago

Ah @Radonirinaunimi, you can also select cuts directly from the CLI, there is also the help to show how :)

But this is only for $(x, Q^2)$.

(not yet on W, just for x and Q2 for the time being, but the in order to cut on W we only need to compute it)

Ah, yes! You mentioned it already :)

Radonirinaunimi commented 2 years ago

Here are the kinematic plots (#23, 84d131f) with a $W$ cut ($W^2 \geq 3.5~\mathrm{GeV}^2$):

Linear $x$

kinematics_linear

Log $x$

kinematics_log

As you can see, the cut cuts off a few of the low-$Q^2$ datapoints from the BEBCWA59 experiment.

alecandido commented 1 year ago

@Radonirinaunimi if it is not too difficult, it would be interesting to plot a line in this space, corresponding to the $W^2$ cut, i.e. the function:

$$ Q^2{min}(x; W^2{cut}) $$

Just for visualization.

Radonirinaunimi commented 1 year ago

@Radonirinaunimi if it is not too difficult, it would be interesting to plot a line in this space, corresponding to the W2 cut, i.e. the function:

Qmin2(x;Wcut2)

Just for visualization.

This is very interesting indeed and actually is already available: https://github.com/NNPDF/nnusf/blob/b3c9becd64923db9db846286365928b9aed45e0f/src/nnusf/plot/kinematics.py#L62-L66

For the time being, the $W^2_{\rm cut}$ is hard-coded to some value, I will modify it such that we can have it as an input argument.

alecandido commented 1 year ago

For the time being, $W^2_{\rm cut}$ is hard-coded to some value, I will modify it such that we can have it as an input argument.

Good, the easiest upgrade you can do is to turn wcut from a boolean to a number, this way:

def plot(
    groups: dict[str, list[list[float]]],
    wcut: Optional[float] = None,
    xlog: bool = True,
    ylog: bool = True,
) -> matplotlib.figure.Figure:

(Optional you find inside typing module). And of course checking for it accordingly:

 if wcut is not None:
     min_value, max_value = ax.get_xlim() 
     xvalue = np.arange(min_value, max_value, 5e-2) 
     fq2 = lambda x: x * (wcut - 0.95) / (1 - x) 
     ax.plot(xvalue, fq2(xvalue), ls="dashed", lw=2)