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

confusing atmospheric extinction profile #31

Open
jsitarek opened this issue Mar 9, 2022 · 9 comments
Open

confusing atmospheric extinction profile #31

jsitarek opened this issue Mar 9, 2022 · 9 comments

Comments

@jsitarek
Copy link
Collaborator

jsitarek commented Mar 9, 2022

the current code selecting the atmospheric extinction file is really confusing.

lst-sim-config/array.cfg

Lines 26 to 27 in 7a71634

#define NAVY_MARITIME 1
#define LOW_EXTINCTION 1

says that we want both low extinction and NAVY MARITIME, but then when we check the actual profile
there is one set of conditions that selects LOW_EXTINCTION:

lst-sim-config/site.cfg

Lines 22 to 31 in 7a71634

#if defined(LOW_EXTINCTION)
echo Using low-aerosol (very quiet sea) atmospheric transmission table for the site on La Palma.
atmospheric_transmission = atm_trans_$(SITE_ALTITUDE)_1_3_2_0_0_0.1_0.1.dat
# elif defined(NAVY_MARITIME)
echo Using navy-maritime atmospheric transmission table for the site on La Palma.
atmospheric_transmission = atm_trans_$(SITE_ALTITUDE)_1_3_0_0_0.dat
# else
echo Warning: using desert atmospheric transmission table for the site on La Palma
atmospheric_transmission = atm_trans_$(SITE_ALTITUDE)_1_10_0_0_$(SITE_ALTITUDE).dat
#endif

but then it is overwritten by a second set of conditions that selects NAVY MARITIME:

lst-sim-config/site.cfg

Lines 39 to 45 in 7a71634

#ifdef NAVY_MARITIME
echo Using navy maritime atmospheric transmission (boundary layer starting at sea level), site $(SITE_NAME).
atmospheric_transmission = atm_trans_$(SITE_ALTITUDE)_1_3_0_0_0.dat
# else
echo Using navy maritime atmospheric transmission (boundary layer starting at $(SITE_ALTITUDE)), site $(SITE_NAME).
atmospheric_transmission = atm_trans_$(SITE_ALTITUDE)_1_10_0_0_$(SITE_ALTITUDE).dat
#endif

which one do we want in the end? I saw that @YoshikiOhtani was running for LOW_EXTINCTION one by specifying the atmosphere transmission file directly as a parameter
I suggest to remove all those conditions and set the atmosphere profile directly the the profile that we want @moralejo @rlopezcoto which one should it be?

@moralejo
Copy link
Collaborator

We should in principle use the same as in the previous LST- dedicated production, i.e. low_extinction. The fact that we used that one probably means that part of the light reduction (w.r.t. nominal) we see with muon rings may be atmospheric and not telescope- related. Do you know what is the difference in transmission between the two?

@jsitarek
Copy link
Collaborator Author

jsitarek commented Mar 11, 2022

I made the test and the difference looks like 4.5% (low extiction, in red, has more light as the name says).
atm_trans_comparison

I think I understand what happened.
The original site file had a long if statement
if PARANAL
...
elif LA PALMA
....
else
...

the PARANAL block was removed, and elif LA PALMA and else condition as well, but what was left was the LP block and the actual else block. So the LP values were always overwritten by the old "else" values.

EDIT: all this is however in the if TELESCOPE == 0 block, so if the setting is set by the command line, whatever happens here gets overwritten so should be fine in the end. Still it is really confusing to me to set it in both places and this can result in problems if some subproductions are done in different way.

I will make a small fix removing the old else block, because this one is for sure not needed, but maybe the whole way of passing the atmosphere should be rethought. Let's discuss in PR

@maxnoe
Copy link
Member

maxnoe commented Mar 11, 2022

We should not mix the pfp precompiler style of setting things with the templating used by the sim runner.

@jsitarek
Copy link
Collaborator Author

I agree @maxnoe
I made PR #32 to remove the erroneous part of the precompiler conditions, but the LP settings are still there.
I think it would be more clean to have this atmosphere settings all in the .cfg files without setting them by hand, but we can also do opposite, remove it completely from the site.cfg and use only the -C option.

@moralejo
Copy link
Collaborator

Hi @jsitarek, thanks for the test. In the standard CTA simulations for CTA-N Navy maritime is used instead. This means that the tuning of the telescope efficiency that we did (with low_extinction) is not applicable to the CTA simulations.

@YoshikiOhtani, @YusukeSuda, was there any reason for adopting the low_extinction option? We should either tell the team preparing the next CTA simulations to use it, or keep the Navy maritime, and then we modify the value we gave them of the telescope efficiency.

@YoshikiOhtani
Copy link
Collaborator

Hi, when I run the productions I copied the CTA-PROD5-LaPalma-baseline.cfg and only modified the telescope configurations, and so I just didn't touch and thus kept the option as default.

@moralejo
Copy link
Collaborator

Thanks @YoshikiOhtani.
You are right, I had checked the CTA-PROD4-LaPalma-Baseline.cfg, and in that one LOW_EXTINCTION is commented out.

In the CTA-PROD5-LaPalma-Baseline.cfg it is again active, so both Prod5 and your LST production used LOW_EXTINCTION. I will find out whether this is also the idea for the next CTA prod.

@jsitarek
Copy link
Collaborator Author

Hi,
the log that I got from @YoshikiOhtani had
Starting ./bin/sim_telarray with the following arguments: ...'atmospheric_transmission=atm_trans_2158_1_3_2_0_0_0.1_0.1.dat'

this is the file for the low extinction. Same thing could have happened with PROD4, I think this value in command line overwrites the value selected in the site file (because this is done only for telescope nr 0)

@maxnoe
Copy link
Member

maxnoe commented Mar 11, 2022

$ eventio_print_simtel_history /fefs/aswg/data/mc/DL0/20200629_prod5_trans_80/gamma/zenith_20deg/south_pointing/off0.4deg/gamma_20deg_180deg_run101___cta-prod5-lapalma_4LSTs_MAGIC_desert-2158m_mono_off0.4.simtel.gz | grep -i atm
2020-11-29T09:24:40 ./bin/sim_telarray -c cfg/CTA/CTA-PROD5-LaPalma-baseline_4LSTs_MAGIC.cfg -DNECTARCAM -DNO_STEREO_TRIGGER -DNUM_TELESCOPES=6 -Icfg/CTA -C Altitude=2158 -C iobuf_maximum=1000000000 -C maximum_telescopes=6 -C atmospheric_transmission=atm_trans_2158_1_3_2_0_0_0.1_0.1.dat -C altitude=2158 -C telescope_theta=20.4 -C telescope_phi=180 -C power_law=2.50 -C histogram_file=Data/sim_telarray/cta-prod5-lapalma_4LSTs_MAGIC/0.4deg/Histograms/gamma_20deg_180deg_run101___cta-prod5-lapalma_4LSTs_MAGIC_desert-2158m_mono_off0.4.hdata.gz -C output_file=Data/sim_telarray/cta-prod5-lapalma_4LSTs_MAGIC/0.4deg/Data/gamma_20deg_180deg_run101___cta-prod5-lapalma_4LSTs_MAGIC_desert-2158m_mono_off0.4.simtel.gz -C random_state=auto -C show=all -
2020-11-29T09:24:40 ATMOSPHERIC_TRANSMISSION atm_trans_2158_1_3_2_0_0_0.1_0.1.dat
2020-11-29T09:24:40 ATMOSPHERIC_TRANSMISSION atm_trans_2158_1_3_2_0_0_0.1_0.1.dat
2020-11-29T09:24:40 ATMOSPHERIC_TRANSMISSION atm_trans_2158_1_3_2_0_0_0.1_0.1.dat
2020-11-29T09:24:40 ATMOSPHERIC_TRANSMISSION atm_trans_2158_1_3_2_0_0_0.1_0.1.dat
2020-11-29T09:24:41 ATMOSPHERIC_TRANSMISSION atm_trans_2158_1_3_2_0_0_0.1_0.1.dat
2020-11-29T09:24:41 ATMOSPHERIC_TRANSMISSION atm_trans_2158_1_3_2_0_0_0.1_0.1.dat
2020-11-29T09:24:41 ATMOSPHERIC_TRANSMISSION atm_trans_2158_1_3_2_0_0_0.1_0.1.dat
2020-11-29T09:24:41 ATMOSPHERIC_TRANSMISSION atm_trans_2158_1_3_2_0_0_0.1_0.1.dat

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

4 participants