Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
41fc1a8
Update MCSource.cc
GallegoSav Nov 11, 2024
47770d4
Update MCOrientation.cc
GallegoSav Nov 11, 2024
c171170
Update MCParameterFile.cc
GallegoSav Nov 11, 2024
511fbf0
Update MCSource.hh
GallegoSav Nov 11, 2024
9d33573
Update MCSource.cc
GallegoSav Nov 11, 2024
8f63b0f
Update MCParameterFile.cc
GallegoSav Nov 11, 2024
2b7c22a
Update MCOrientation.cc
GallegoSav Nov 11, 2024
be70810
Update MCParameterFile.cc
GallegoSav Nov 11, 2024
da90572
Merge branch 'zoglauer:develop-cosi' into develop-cosi
GallegoSav Jan 6, 2025
2339d6c
Update MCSource.cc
GallegoSav Jan 6, 2025
5513734
Update MCParameterFile.cc
GallegoSav Jan 6, 2025
ade61a0
Update MCSource.hh
GallegoSav Jan 6, 2025
9654207
Update MCSource.hh
GallegoSav Jan 6, 2025
54579c1
Update MCParameterFile.cc
GallegoSav Jan 6, 2025
831d571
Update MCParameterFile.cc
GallegoSav Jan 6, 2025
c76abf7
Update MCSource.cc
GallegoSav Jan 6, 2025
6b0479b
Update MCSource.cc
GallegoSav Jan 6, 2025
36963a6
Create Polarization_IAUconvention
GallegoSav Jan 6, 2025
9f38f8d
Delete resource/examples/advanced/Polarization_IAUconvention
GallegoSav Jan 6, 2025
94ef288
Create Polarized.source
GallegoSav Jan 6, 2025
0b121c3
Update Polarized.source
GallegoSav Jan 6, 2025
8ad6d64
Create test.ori
GallegoSav Jan 6, 2025
5d2e644
Rename EarthOccultation.source to EarthOccultation_pointsource.source
GallegoSav Jan 9, 2025
ca0793a
Merge branch 'zoglauer:develop-cosi' into develop-cosi
GallegoSav Jan 14, 2025
a0afc1b
Merge branch 'zoglauer:develop-cosi' into develop-cosi
GallegoSav Jul 3, 2025
c49c256
Update SensitivityOptimizer.cxx
GallegoSav Jul 3, 2025
43f5f8c
Merge branch 'zoglauer:develop-cosi' into develop-cosi
GallegoSav Oct 29, 2025
d42be25
Update MResponseImagingBinnedMode.cxx
GallegoSav Oct 29, 2025
3e9ce6a
Update MResponsePolarizationBinnedMode.cxx
GallegoSav Oct 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 73 additions & 10 deletions src/addon/SensitivityOptimizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ bool SensitivityOptimizer::ParseCommandLine(int argc, char** argv)
m_MimrecSettings.Read(ConfigurationFile);
m_EventSelector.SetSettings(&m_MimrecSettings);
m_EventSelector.SetGeometry(&m_Geometry);

cout<<"Coordinate system : "<<m_MimrecSettings.GetSourceCoordinates()<<endl;
return true;
}

Expand Down Expand Up @@ -1832,10 +1832,32 @@ bool SensitivityOptimizer::Analyze()
double xx = m_PosTheta[x];
double xy = m_PosPhi[y];
double xz = 1000000000.0;
MMath::SphericToCartesean(xx, xy, xz);
MVector Position(xx, xy, xz);

S.SetSourceWindow(true, Position, MCoordinateSystem::c_Cartesian3D);

MVector Position(0.0, 0.0, 1.0);

// Put the correct Position and coord system for the source
if (m_MimrecSettings.GetCoordinateSystem() == MCoordinateSystem::c_Spheric) {
Position.SetMagThetaPhi(xz, xx*c_Rad, xy*c_Rad);
} else if (m_MimrecSettings.GetCoordinateSystem() == MCoordinateSystem::c_Galactic) {
Position.SetMagThetaPhi(xz, (xx+90)*c_Rad, xy*c_Rad);
} else if (m_MimrecSettings.GetCoordinateSystem() == MCoordinateSystem::c_Cartesian2D ||
m_MimrecSettings.GetCoordinateSystem() == MCoordinateSystem::c_Cartesian3D) {
MMath::SphericToCartesean(xx, xy, xz);
MVector Position(xx, xy, xz);
} else {
merr<<"Unknown coordinate system ID: "<<m_MimrecSettings.GetCoordinateSystem()<<fatal;
}



S.SetSourceWindow(true, Position, m_MimrecSettings.GetSourceCoordinates());
//MMath::SphericToCartesean(xx, xy, xz);
//MVector Position(xx, xy, xz);


//S.SetSourceWindow(true, Position, MCoordinateSystem::c_Cartesian3D);


double ARMMin = m_MimrecSettings.GetSourceARMMin();
double ARMMax = m_MimrecSettings.GetSourceARMMax();
Expand Down Expand Up @@ -1946,10 +1968,30 @@ bool SensitivityOptimizer::Analyze()
double xx = m_PosTheta[x];
double xy = m_PosPhi[y];
double xz = 1000000000.0;
MMath::SphericToCartesean(xx, xy, xz);
MVector Position(xx, xy, xz);

S.SetSourceWindow(true, Position, MCoordinateSystem::c_Cartesian3D);
MVector Position(0.0, 0.0, 1.0);

// Put the correct Position and coord system for the source
if (m_MimrecSettings.GetCoordinateSystem() == MCoordinateSystem::c_Spheric) {
Position.SetMagThetaPhi(xz, xx*c_Rad, xy*c_Rad);
} else if (m_MimrecSettings.GetCoordinateSystem() == MCoordinateSystem::c_Galactic) {
Position.SetMagThetaPhi(xz, (xx+90)*c_Rad, xy*c_Rad);
} else if (m_MimrecSettings.GetCoordinateSystem() == MCoordinateSystem::c_Cartesian2D ||
m_MimrecSettings.GetCoordinateSystem() == MCoordinateSystem::c_Cartesian3D) {
MMath::SphericToCartesean(xx, xy, xz);
MVector Position(xx, xy, xz);
} else {
merr<<"Unknown coordinate system ID: "<<m_MimrecSettings.GetCoordinateSystem()<<fatal;
}



S.SetSourceWindow(true, Position, m_MimrecSettings.GetSourceCoordinates());

//MMath::SphericToCartesean(xx, xy, xz);
//MVector Position(xx, xy, xz);

//S.SetSourceWindow(true, Position, MCoordinateSystem::c_Cartesian3D);

double ARMMin = m_MimrecSettings.GetSourceARMMin();
double ARMMax = m_MimrecSettings.GetSourceARMMax();
Expand Down Expand Up @@ -2045,10 +2087,31 @@ bool SensitivityOptimizer::Analyze()
double xx = m_PosTheta[x];
double xy = m_PosPhi[y];
double xz = 1000000000.0;
MMath::SphericToCartesean(xx, xy, xz);
MVector Position(xx, xy, xz);

S.SetSourceWindow(true, Position, MCoordinateSystem::c_Cartesian3D);

MVector Position(0.0, 0.0, 1.0);

// Put the correct Position and coord system for the source
if (m_MimrecSettings.GetCoordinateSystem() == MCoordinateSystem::c_Spheric) {
Position.SetMagThetaPhi(xz, xx*c_Rad, xy*c_Rad);
} else if (m_MimrecSettings.GetCoordinateSystem() == MCoordinateSystem::c_Galactic) {
Position.SetMagThetaPhi(xz, (xx+90)*c_Rad, xy*c_Rad);
} else if (m_MimrecSettings.GetCoordinateSystem() == MCoordinateSystem::c_Cartesian2D ||
m_MimrecSettings.GetCoordinateSystem() == MCoordinateSystem::c_Cartesian3D) {
MMath::SphericToCartesean(xx, xy, xz);
MVector Position(xx, xy, xz);
} else {
merr<<"Unknown coordinate system ID: "<<m_MimrecSettings.GetCoordinateSystem()<<fatal;
}



S.SetSourceWindow(true, Position, m_MimrecSettings.GetSourceCoordinates());

//MMath::SphericToCartesean(xx, xy, xz);
//MVector Position(xx, xy, xz);

//S.SetSourceWindow(true, Position, MCoordinateSystem::c_Cartesian3D);
S.SetSourceARM(0, m_ARMorRadius[a]);
S.SetBeamRadius(m_BRA[b]);
S.SetBeamDepth(m_BDE[c]);
Expand Down
4 changes: 2 additions & 2 deletions src/response/src/MResponseImagingBinnedMode.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ MString MResponseImagingBinnedMode::Options()
out<<" dmin: minimum distance (default: 0 cm)"<<endl;
out<<" dmax: maximum distance (default: 1,000 cm)"<<endl;
out<<" dbins: number of distance bins between min and max distance (default: 1)"<<endl;
out<<" atabsfile: the atmospheric absorption file name (default: \"\" (i.e. none))"<<endl;
out<<" atabsheight: altitude for the atmospheric absorption (default: 33500 m)"<<endl;
out<<" atabsfilename: the atmospheric absorption file name (default: \"\" (i.e. none))"<<endl;
out<<" atabsaltitude: altitude for the atmospheric absorption (default: 33500 m)"<<endl;

return MString(out);
}
Expand Down
4 changes: 2 additions & 2 deletions src/response/src/MResponsePolarizationBinnedMode.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ MString MResponsePolarizationBinnedMode::Options()
out<<" dbins: number of distance bins between min and max distance (default: 1)"<<endl;
out<<" pbins: number of polarization bins bins between min and max distance (default: 18)"<<endl;
out<<" pmode: Either relativex, relativey, or relativez (default: relativez)"<<endl;
out<<" atabsfile: the atmopheric absorption file name (default: \"\" (i.e. none))"<<endl;
out<<" atabsheight: altitude for the atmospheric absorption (default: 33500)"<<endl;
out<<" atabsfilename: the atmopheric absorption file name (default: \"\" (i.e. none))"<<endl;
out<<" atabsaltitude: altitude for the atmospheric absorption (default: 33500)"<<endl;

return MString(out);
}
Expand Down