-
Notifications
You must be signed in to change notification settings - Fork 1
Initial commit of magma's mascgen algorithm in Python #18
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
base: main
Are you sure you want to change the base?
Conversation
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.
Dunno if we use this license or a different one?
Either case it shouldn't live here, the license lives in top level of the repo
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.
Can we convert the Jupiter notebook into a test file with test cases?
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.
No toml at this level, can you move the toml to the top level of lris2 project?
| sel = (ydivrow >= 0) & (ydivrow_floor < csuparams.num_bar_pairs) & (ydivrow > ydivrow_floor + fac2) & (ydivrow < ydivrow_floor + fac1 + fac2) | ||
| self.data.loc[sel, 'obj_rr'] = ydivrow_floor[sel].astype(int) | ||
|
|
||
| # def set_overlap_row(self, buffer, csuparams): |
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.
Do we need this code since it is commented out?
| if j < 0: | ||
| break | ||
| # If there is a best node in the conflicting row, compare scores | ||
| prev_total = self.bestNodes[j].total_score() |
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.
Can this ever be None?
| config = yaml.safe_load(file) | ||
| return config | ||
|
|
||
| def get_args(): |
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 would keep this separate from the algorithm itself
Added lris2-mascgen/. The main code is in lris2-mascgen/lris2_mascgen/. The script magma_algorithm.py contains the optimization routine, utils.py contain some helper functions, slit.py is from the older version of Magma Mascgen code and it might be obsolete but I committed it for now.
lris2-mascgen/config.yaml contains CSU specific parameters that magma_algorithm.py uses.
lris2-mascgen/example.ipynb contains an example of how to run magma_algorithm.py.