Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an extra (optional) point at the end of the perturbation interval #253

Open
janmalec opened this issue Feb 14, 2023 · 1 comment
Open
Assignees
Milestone

Comments

@janmalec
Copy link

janmalec commented Feb 14, 2023

The perturbation procedure from Sandy sometimes produces interpolation artifacts when the energy grid of the initial cross section is too sparse. This can be seen on the attached images, where the lines labeled "Broadr + perturbed" and "Broadr + perturbed + proc" feature a smooth tail from the maxiumum value to zero at the edge of the perturbation. From the code sample from the custom perturbation function:

            enew = np.union1d(self.data.index.values, pert.right.index.values)
            u_xs = self.reshape(enew)
            u_pert = pert.reshape(enew)
            u_xs.data[(mat, mt)] = u_xs.data[(mat, mt)] * u_pert.right.values

it is clear that the point marking the edge of the perturbation interval is added to the total grid, but another point right next to it could be added to define the edge of the perturbation. This additional point can be optional and selected by the user. I am currently working on this feature and will submit a pull request soon.

The same images show another potential issue in the sampling procedure, where the cross section can change because broadening happens after the perturbation, but I will open a separate issue for that and submit a separate pull request (edit: reference: #254 ) .

group0_marked

@janmalec janmalec changed the title Add an extra (optional) point at the end of the poerturbation interval Add an extra (optional) point at the end of the perturbation interval Feb 14, 2023
@luca-fiorito-11
Copy link
Owner

See #254

@luca-fiorito-11 luca-fiorito-11 self-assigned this Feb 16, 2023
@luca-fiorito-11 luca-fiorito-11 added this to the 1.0 milestone Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants