Skip to content

Conversation

@GernotMaier
Copy link
Contributor

@GernotMaier GernotMaier commented Jan 28, 2025

Important: this PR merges into db-simulation-model-refactoring

Corrections to the reference model (==values from the new model DB) to reproduce the original prod5/prod6 configurations as provided by sim_telarray.

Simplifies also the reading of names.get_simulation_software_name_from_parameter_name() (telescope/site parameters are not required).

@GernotMaier GernotMaier self-assigned this Jan 28, 2025
@ctao-dpps-sonarqube

This comment has been minimized.

@ctao-dpps-sonarqube

This comment has been minimized.

@ctao-dpps-sonarqube

This comment has been minimized.

@GernotMaier GernotMaier marked this pull request as ready for review January 28, 2025 12:44
@ctao-dpps-sonarqube

This comment has been minimized.

Copy link
Contributor

@orelgueta orelgueta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of comments and the following question:
Should I check the values you changed one by one in detail or should I trust they are OK? From memory, they look fine, but that's not enough if they need an actual review.

type:
- MSTN
- MSTS
- SSTS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove only SSTs if it is relevant only for FlashCams?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, see above.

type:
- MSTN
- MSTS
- SSTS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove only SSTs if it is relevant only for FlashCams?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, see above.

type:
- MSTN
- MSTS
- SSTS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove only SSTs if it is relevant only for FlashCams?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, see above.

type:
- MSTN
- MSTS
- SSTS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove only SSTs if it is relevant only for FlashCams?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, see above.

type:
- MSTN
- MSTS
- SSTS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove only SSTs if it is relevant only for FlashCams?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, see above.

type:
- MSTN
- MSTS
- SSTS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove only SSTs if it is relevant only for FlashCams?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, see above.

data:
- type: double
unit: ns
default: 100.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The references below have a 1000, but the default here is 100. I guess that's the default in sim_telarray, but should we follow that or what is most common for us?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. I've set it to the sim_telarray default. Changed to 1000.

@GernotMaier
Copy link
Contributor Author

@orelgueta - thanks for the comments.

Changed the dsum options to MSTs only and the default for array_window.

Note:

  • don't think we use at this point the list of applicable telescopes in the schema files (we should...)
  • don't think we use the default values anywhere. I do think we should decide if we introduce a 'dummy default telescope' or default values. But not both.

@ctao-dpps-sonarqube

This comment has been minimized.

@orelgueta
Copy link
Contributor

Changed the dsum options to MSTs only and the default for array_window.

OK!

  • don't think we use at this point the list of applicable telescopes in the schema files (we should...)

Why do you say that? I thought we saw in this exercise that these lists are used to decide if to plot a parameter or not.

  • don't think we use the default values anywhere. I do think we should decide if we introduce a 'dummy default telescope' or default values. But not both.

I don't agree, I do think we need both. The default values in the schema file should be reasonable ones while the dummy telescope should include mandatory parameters with clearly wrong parameters so that if there is an issue with one of the telescopes defined, the program crash instead of defaulting to some random (e.g., LST) values.

Lastly, you didn't answer the following question:

Should I check the values you changed one by one in detail or should I trust they are OK? From memory, they look fine, but that's not enough if they need an actual review.

@GernotMaier
Copy link
Contributor Author

I think I am fine with you browsing through the changed values. I have run the script from simtools-extra (gammasim/simtools-extra#1) to test and compare the parameters. They show good agreement now and I am confident that the prod5 / prod6 values in the new database are correct (have to do one more check on the site parameters)

Copy link
Contributor

@orelgueta orelgueta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Luckily I had to wait for cvmfs and decided to take a look while waiting. Two comments on the values that might be important.

telescope_random_angle = 0.0
telescope_random_error = 0.0
telescope_transmission = 0.908661 0.0 0.0 0.0 0.0 0.0
telescope_transmission = 0.908661 0.0154576 4.0 1.21166
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bug in Prod5. It technically should have been

telescope_transmission = 0.908661,1,0.0154576,4.0,1.21166

However, the 1 was missing, so it was in fact interpreted during simulations as a constant value:

telescope_transmission = 0.908661

which is essentially what you had originally.

I therefore suggest that we either take what was actually simulated (i.e., revert this change), or we fix the Prod5 model in our database. I vote for the former since we want to have what was simulated in Prod5, even if it was wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

telescope_random_angle = 0.0
telescope_random_error = 0.0
telescope_transmission = 0.908661 0.0 0.0 0.0 0.0 0.0
telescope_transmission = 0.908661 0.0154576 4.0 1.21166
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

@ctao-dpps-sonarqube
Copy link

Passed

Analysis Details

0 Issues

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 0 Code Smells

Coverage and Duplications

  • Coverage 100.00% Coverage (93.30% Estimated after merge)
  • Duplications 0.00% Duplicated Code (0.00% Estimated after merge)

Project ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w

View in SonarQube

@GernotMaier
Copy link
Contributor Author

Thanks again @orelgueta - fixed both issue.

Let me know if this is fine and if we can go ahead and merge it into the *db-simulation-model-refactoring branch.

@GernotMaier GernotMaier merged commit 715e1b5 into db-simulation-model-refactoring Jan 29, 2025
12 of 13 checks passed
@GernotMaier GernotMaier deleted the new-db-simulation-model-corrections branch January 29, 2025 09:34
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

Successfully merging this pull request may close these issues.

3 participants