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

Tickets/DM-10848 #1

Merged
merged 5 commits into from Jul 31, 2017
Merged

Tickets/DM-10848 #1

merged 5 commits into from Jul 31, 2017

Conversation

natelust
Copy link
Collaborator

No description provided.

Stop scaling the noise used for fake sources by the amplifier gain
as this effect should have been dealt with in ISR
Make the RandomStarFakeSourcesTask able to run with the fake
object insertion hooks in the LSST pipeline
Make the RandomGalSimFakesTask able to run with the fake object
insertion hooks in the LSST pipeline
Make the PositionGalsimFakes task compatible with the LSST fake
object pipeline hooks.
nStars = lsst.pex.config.Field(dtype=int, default=1,
doc="Number of stars to add")
magnitude = lsst.pex.config.Field(dtype=float, default=20.0,
doc="Magnitude of all stars to be added")
margin = lsst.pex.config.Field(dtype=int, default=None, optional=True,
doc="Size of margin at edge that should not be added")
seed = lsst.pex.config.Field(dtype=int, default=0,
seed = lsst.pex.config.Field(dtype=int, default=1,

Choose a reason for hiding this comment

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

Why is the default seed changed to 1?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Simply because the code fails if the seed is zero with an InvalidParameterError with the current stack. As it was just a seed, I figured the value didnt matter

Choose a reason for hiding this comment

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

I see. Sometimes I've seed=0 mean use the current time stamp, but I don't know if that is the case with our software. If seed=0 is not allowed, than it probably doesn't matter.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, this is produced:

lsst.afw.math.Random(seed=0)
---------------------------------------------------------------------------
InvalidParameterError                     Traceback (most recent call last)
<ipython-input-41-e4860cd80795> in <module>()
----> 1 lsst.afw.math.Random(seed=0)

InvalidParameterError: 
  File "src/math/Random.cc", line 66, in void lsst::afw::math::Random::initialize()
    Invalid RNG seed: 0 {0}
lsst::pex::exceptions::InvalidParameterError: 'Invalid RNG seed: 0'

Copy link

@rearmstr rearmstr left a comment

Choose a reason for hiding this comment

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

Changes look good. Only one small question.

@natelust natelust merged commit 478cac5 into master Jul 31, 2017
@ktlim ktlim deleted the tickets/DM-10848 branch August 25, 2018 05:56
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.

None yet

2 participants