-
Notifications
You must be signed in to change notification settings - Fork 1
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
New simulation model #761
New simulation model #761
Conversation
Fix a bug in calling the DB configuration in conftests (which led to misconfiguration of the DB for unit tests); reduce number of DB calls for SimulationModel.
Unit vs units change in data metaschema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
I made just a few comments and only one of them worries me a bit (about the Structure/Camera readout from the DB).
simtools/layout/array_layout.py
Outdated
except KeyError: | ||
pass | ||
|
||
def _load_telescope_list(self, table): | ||
def initialize_array_layout( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I see it fixed (doesn't start with _
)
Simtel site parameters as dict | ||
|
||
""" | ||
return super().get_simtel_parameters(telescope_model=telescope_model, site_model=site_model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this at all? if you call the function from the base class without any changes anyway, you can just remove it and you will get the function from the base class
"SSTS": {"site": "South", "observatory": "CTAO", "class": "telescope"}, | ||
"SCTS": {"site": "South", "observatory": "CTAO", "class": "telescope"}, | ||
# calibration devices | ||
"ILLN": {"site": "North", "observatory": "CTAO", "class": "calibration"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since to write these dictionaries you looked these up, perhaps you can add comments on each of this to say what it is cause I definitely cannot tell from the short name. But only if you can do it off the top of your head, no need to put effort into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean what ILLN
North means? I think I remember.
I anyway plan to remove all those lines and move them into the json schema (some parts are already duplicated, e.g., the list of telescopes) - names.py will read then the schema files to get the naming dicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, ILLN, RLDN, STPN, etc. I don't remember what all of them means and I think it would be useful to have the non-abbreviated names as well. Also if it's in the schema files it would be useful.
Propagated this to issue #828 (and again I cannot answer to this comment) |
@orel - thanks for the review!! I've addressed all of your comments. I will need your help on the |
Changes look good. Let's discuss the thing about the camera/optics in a quick call instead, it would be quicker. The only other point here is the |
63bb86f
into
dev-simulation-model-elements-naming
This is a very large pull request with several major changes:
model_parameter
class and to specialized classes calledtelescope_model
andsite_model
(allows to add in future e.g., illuminator_model classes)units
useunit
(as in astropy)Given that telescope naming has changed, this PR required a lot of name-but-not-functional changes in code, tests, and data files used.
Temporary items to be fixed best in a future PR:
Suggestion for review:
db_handler
is now indb/db_handler
(as there are more db-related modules). This obviously changes all imports on db_handlernames.py
, thendb_handler
and then the model parameter classes (model_parameter
,telescope_model
,site_model
).