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

Add max_noll_index argument to work with ts_ofc extended to zk28 #37

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

gmegh
Copy link
Contributor

@gmegh gmegh commented Apr 5, 2024

No description provided.

Copy link
Member

@jbkalmbach jbkalmbach left a comment

Choose a reason for hiding this comment

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

Ok, made some comments but it's a little hard to see everything since this includes changes from the other PR. Can you separate the pyproject and formatting updates from this PR?

self.ofc_calc = OFC(OFCData(cam_type.value))
self.ofc_calc.ofc_data.zn_selected = np.arange(
self.ofc_calc.ofc_data.znmin, self.max_noll_index
Copy link
Member

Choose a reason for hiding this comment

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

I think we assume we start at Z4 everywhere in ts_imsim. Should we set ofc_calc.ofc_data.znmin = 3 somewhere so that OFC expects to receive what ts_imsim is set up to pass in case the default changes for whatever reason in ts_ofc?

parser.add_argument(
"--max_noll_index",
type=int,
default=22,
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to switch default to 28? Are we planning on using 28 for commissioning tests?

@@ -65,6 +66,9 @@ def __init__(self) -> None:
# imSim Component
self.imsim_cmpt = None

# Maximum Noll index
self.max_noll_index = 22
Copy link
Member

Choose a reason for hiding this comment

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

Does this have to be a class variable? Can we pass it through like all other options except boresight variables?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, the max_noll_index is used in different functions and I thought it was cleaner for it to be a class variable instead of having to pass it down as an attribute through multiple nested functions

Copy link
Member

Choose a reason for hiding this comment

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

Ok. But let's set it to None here like the rest so that the default value will come from the command line arguments. How's that sound?

@@ -50,7 +50,7 @@ class ImsimCmpt:
generate full imsim configuration files.
"""

def __init__(self) -> None:
def __init__(self, num_of_zk: int) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

Can you add the parameter to the class docstring above?

Copy link
Member

@jbkalmbach jbkalmbach left a comment

Choose a reason for hiding this comment

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

Looks good. Just a few comments.

@gmegh gmegh force-pushed the tickets/DM-43390 branch 2 times, most recently from c077b66 to dfed356 Compare April 15, 2024 22:43
@gmegh gmegh merged commit 817e6b4 into develop Apr 15, 2024
4 checks passed
@gmegh gmegh deleted the tickets/DM-43390 branch April 15, 2024 23:24
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.

2 participants