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

Bug on base/mqi_treatment_machine_pbs.hpp #10

Closed
Giorgio5i6 opened this issue Oct 13, 2023 · 1 comment
Closed

Bug on base/mqi_treatment_machine_pbs.hpp #10

Giorgio5i6 opened this issue Oct 13, 2023 · 1 comment

Comments

@Giorgio5i6
Copy link

Hi! Thank you for your incredible work!

I found a bug in the general PBS treatment machine class (base/mqi_treatment_machine_pbs.hpp). I provided the machine parameter from an input file and I obtained random beam positions. In the PBS definition line 105 was missing the assignment of the treatment_machine_ion::SAD

The following is my version of the corrected code.

Best, Giorgio Cartechini

pbs(const std::string filename) : cm2mm(10.0), mm2cm(0.0) {
    this->load_beamdata(filename);
    if (geometry_spec_.SAD[0] == 0)
        treatment_machine_ion<T>::SAD_[0] = std::numeric_limits<T>::infinity();
    else 
        treatment_machine_ion<T>::SAD_[0] = geometry_spec_.SAD[0];
        
    if (geometry_spec_.SAD[1] == 0)
        treatment_machine_ion<T>::SAD_[1] = std::numeric_limits<T>::infinity();
    else
        treatment_machine_ion<T>::SAD_[1] = geometry_spec_.SAD[1];
}
@leehoy
Copy link
Collaborator

leehoy commented Dec 26, 2023

Thank you for reporting this Giorgio.
We have updated the code.

@leehoy leehoy closed this as completed Dec 26, 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