IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Air Shower Physics
corsika
Commits
457efc3f
Commit
457efc3f
authored
3 years ago
by
Juan Ammerman
Committed by
Nikos Karastathis
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Changed use of gridResolution to antenna.sample_rate_
parent
dff651d2
No related branches found
No related tags found
1 merge request
!329
Radio interface
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
corsika/modules/radio/ZHS.hpp
+7
-8
7 additions, 8 deletions
corsika/modules/radio/ZHS.hpp
with
7 additions
and
8 deletions
corsika/modules/radio/ZHS.hpp
+
7
−
8
View file @
457efc3f
...
@@ -104,7 +104,6 @@ namespace corsika {
...
@@ -104,7 +104,6 @@ namespace corsika {
auto
deltaT1_
{
startTime_
+
paths1
[
i
].
propagation_time_
};
auto
deltaT1_
{
startTime_
+
paths1
[
i
].
propagation_time_
};
auto
deltaT2_
{
endTime_
+
paths2
[
i
].
propagation_time_
};
auto
deltaT2_
{
endTime_
+
paths2
[
i
].
propagation_time_
};
long
double
const
gridResolution_
{
antenna
.
sample_rate_
*
1
_s
};
//make deltaT1_ be the smallest time => changes step function order so
//make deltaT1_ be the smallest time => changes step function order so
// constants is changed to account for it
// constants is changed to account for it
if
(
deltaT1_
>
deltaT2_
)
if
(
deltaT1_
>
deltaT2_
)
...
@@ -115,8 +114,8 @@ namespace corsika {
...
@@ -115,8 +114,8 @@ namespace corsika {
}
}
long
const
startBin
{
std
::
floor
(
(
deltaT1_
/
1
_s
)
/
gridResolution
_
)};
long
const
startBin
{
std
::
floor
(
deltaT1_
*
antenna
.
sample_rate
_
)};
long
const
endBin
{
std
::
floor
(
(
deltaT2_
/
1
_s
)
/
gridResolution
_
)};
long
const
endBin
{
std
::
floor
(
deltaT2_
*
antenna
.
sample_rate
_
)};
auto
const
betaPerp_
{
midPaths
[
i
].
emit_
.
cross
(
beta_
.
cross
(
midPaths
[
i
].
emit_
))};
auto
const
betaPerp_
{
midPaths
[
i
].
emit_
.
cross
(
beta_
.
cross
(
midPaths
[
i
].
emit_
))};
double
const
denominator
{
1
-
midPaths
[
i
].
refractive_index_source_
*
double
const
denominator
{
1
-
midPaths
[
i
].
refractive_index_source_
*
...
@@ -131,7 +130,7 @@ namespace corsika {
...
@@ -131,7 +130,7 @@ namespace corsika {
// std::cout << "Track in one bin !" << std::endl;
// std::cout << "Track in one bin !" << std::endl;
if
(
std
::
fabs
(
denominator
)
>
1.e-15L
)
//if not in Cerenkov angle then
if
(
std
::
fabs
(
denominator
)
>
1.e-15L
)
//if not in Cerenkov angle then
{
{
double
const
f
{
std
::
fabs
((
deltaT2_
-
deltaT1_
)
/
1
_s
)
/
gridResolution_
};
double
const
f
{
std
::
fabs
((
deltaT2_
-
deltaT1_
)
*
antenna
.
sample_rate_
)
};
//should be PotentialVector const Vp_ = betaPerp_.getComponents()/denominator/
//should be PotentialVector const Vp_ = betaPerp_.getComponents()/denominator/
// midPaths[i].R_distance_ * constants * f;
// midPaths[i].R_distance_ * constants * f;
// but to make it compile until antenna is adapted it stays like that to test it.
// but to make it compile until antenna is adapted it stays like that to test it.
...
@@ -143,7 +142,7 @@ namespace corsika {
...
@@ -143,7 +142,7 @@ namespace corsika {
}
}
else
//If emission in Cerenkov angle => approximation
else
//If emission in Cerenkov angle => approximation
{
{
double
const
f
{(
endTime_
-
startTime_
)
/
gridResolution_
/
1
_s
};
double
const
f
{(
endTime_
-
startTime_
)
*
antenna
.
sample_rate_
};
ElectricFieldVector
const
Vp_
=
betaPerp_
.
getComponents
()
/
ElectricFieldVector
const
Vp_
=
betaPerp_
.
getComponents
()
/
midPaths
[
i
].
R_distance_
*
constants
*
f
/
1
_s
;
midPaths
[
i
].
R_distance_
*
constants
*
f
/
1
_s
;
// std::cout << "Vector Potential in Cerenkov Angle: " << Vp_ << std::endl;
// std::cout << "Vector Potential in Cerenkov Angle: " << Vp_ << std::endl;
...
@@ -157,14 +156,14 @@ namespace corsika {
...
@@ -157,14 +156,14 @@ namespace corsika {
// std::cout << "Track in multiple bins !" << std::endl;
// std::cout << "Track in multiple bins !" << std::endl;
if
(
it
==
0
)
//start of track
if
(
it
==
0
)
//start of track
{
{
double
const
f
{
std
::
fabs
(
startTime_
/
1
_s
/
gridResolution
_
-
startBin
)};
double
const
f
{
std
::
fabs
(
startTime_
*
antenna
.
sample_rate
_
-
startBin
)};
ElectricFieldVector
const
Vp_
=
betaPerp_
.
getComponents
()
*
f
*
ElectricFieldVector
const
Vp_
=
betaPerp_
.
getComponents
()
*
f
*
constants
/
denominator
/
midPaths
[
i
].
R_distance_
/
1
_s
;
constants
/
denominator
/
midPaths
[
i
].
R_distance_
/
1
_s
;
antenna
.
receive
(
deltaT1_
,
betaPerp_
,
Vp_
);
antenna
.
receive
(
deltaT1_
,
betaPerp_
,
Vp_
);
}
}
else
if
(
it
==
numberOfBins
)
//end of track
else
if
(
it
==
numberOfBins
)
//end of track
{
{
double
const
f
{
std
::
fabs
(
endTime_
/
1
_s
/
gridResolution
_
-
endBin
)};
double
const
f
{
std
::
fabs
(
endTime_
*
antenna
.
sample_rate
_
-
endBin
)};
ElectricFieldVector
const
Vp_
=
betaPerp_
.
getComponents
()
*
f
*
ElectricFieldVector
const
Vp_
=
betaPerp_
.
getComponents
()
*
f
*
constants
/
denominator
/
midPaths
[
i
].
R_distance_
/
1
_s
;
constants
/
denominator
/
midPaths
[
i
].
R_distance_
/
1
_s
;
antenna
.
receive
(
deltaT2_
,
betaPerp_
,
Vp_
);
antenna
.
receive
(
deltaT2_
,
betaPerp_
,
Vp_
);
...
@@ -173,7 +172,7 @@ namespace corsika {
...
@@ -173,7 +172,7 @@ namespace corsika {
{
{
ElectricFieldVector
const
Vp_
=
betaPerp_
.
getComponents
()
*
constants
/
ElectricFieldVector
const
Vp_
=
betaPerp_
.
getComponents
()
*
constants
/
denominator
/
midPaths
[
i
].
R_distance_
/
1
_s
;
denominator
/
midPaths
[
i
].
R_distance_
/
1
_s
;
antenna
.
receive
(
deltaT1_
+
gridResolution_
*
it
*
1
_s
,
betaPerp_
,
Vp_
);
antenna
.
receive
(
deltaT1_
+
it
/
antenna
.
sample_rate_
,
betaPerp_
,
Vp_
);
}
}
}
}
}
//end loop over bins in which potential vector is not zero
}
//end loop over bins in which potential vector is not zero
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment