Closed carmeloevoli closed 2 years ago
It should dependent on r, not dir, right?
yes, but I think it would be better if implemented in post-processing. I'm still thinking which should be the most efficient way to do that.
I would say that to implement this efficiently we should provide the user with two functions:
to have a function in RingModel
which takes as an input a 12-double vector containing the re-scaling of the ring column densities. E.g., I want to half the XCO in the first ring and double in the third ring:
auto gas = std::make_shared<neutralgas::RingModel>(gasType);
gas->rescaleRings({0.5,1,2,1,1,1,1,1,1,1,1,1});
to have a function which takes min and max radius and a re-scaling factor. All the rings within this range are re-scaled by this factor. E.g., I want to double the XCO in the inner 3 kpc:
auto gas = std::make_shared<neutralgas::RingModel>(gasType);
gas-> rescaleRings(0_kpc, 3_kpc, 2);
That should be easy to implement. What do you think?
Implemented in commit https://github.com/cosmicrays/hermes/commit/b40dae2b749e7d9cb8c32ccd91ef6738c91f97fa
https://github.com/cosmicrays/hermes/blob/1587c84bf0f4620852f9c3bc5b3165360202c003/src/neutralgas/RingModel.cpp#L97