Skip to content

Make the class-method docstring better reflect the return value #156

Open
0Navin0 wants to merge 2 commits intoLSSTDESC:mainfrom
0Navin0:docString
Open

Make the class-method docstring better reflect the return value #156
0Navin0 wants to merge 2 commits intoLSSTDESC:mainfrom
0Navin0:docString

Conversation

@0Navin0
Copy link

@0Navin0 0Navin0 commented Feb 12, 2026

No description provided.

Navin Chaurasiya added 2 commits February 12, 2026 11:26
Mention lensing magnification of SED in the doc-string.
The classes `DiffskyObject` (diffsky_object.py) and `GalaxyObject`
(galaxy_object.py) inherit from `BaseObject` class (base_object.py).
They redefine the method `get_total_observer_sed` to include lensing
magnification but their docstrings didn't reflect that.  This commit
corrects the docstring to reflect for this change.
Copy link
Member

@arunkannawadi arunkannawadi left a comment

Choose a reason for hiding this comment

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

There is also this method and docstring in base_object that needs to be changed as well. Is including 'lensing magnification' the critical change here?

@0Navin0
Copy link
Author

0Navin0 commented Feb 26, 2026

It seems that the base_object.py is used to define only the minimal and necessary methods for any generic object. The method base_object.get_total_observer_sed doesn't include additional effects like magnification; it just returns the total SED as read from the SED file. It seems that the idea is to let subclasses handle additional features later on. So the DiffskyObject and GalaxyObject include magnification accordingly, but their docstrings weren't changed. Also, following this thinking, base_object.py leaves some methods as NotImplementedError and expects subclasses to overwrite if needed.

Did it answer your question? The change was not too much, but I thought it might be helpful to update the docstrings.

@0Navin0
Copy link
Author

0Navin0 commented Feb 26, 2026

Apparently, this type of base_object implementation is needed because the SEDs of SSO-type objects don't need magnification before computing their fluxes, as I see in the sso_object.py.

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