Closed KatieWoe closed 5 years ago
I believe we intentionally changed the behavior as part of https://github.com/phetsims/wave-interference/issues/349, but I'll leave it open to see if @arouinfar concurs.
I believe the brighter screen was an intentional part of #349, but the decay time is pretty lengthy and seems unintentional to me. Can you look into it @samreid?
I remember at one of our more recent design meetings, @kathy-phet also mentioned the decay time as a general concern, perhaps because it was unintentionally lengthened?
In https://github.com/phetsims/wave-interference/issues/208 we settled on a history length of 90. Then when we increased the lattice size in https://github.com/phetsims/wave-interference/issues/315 we scaled it up by a factor of CALIBRATION_SCALE = 1.82
because we had to run the clock that much faster to get the same wave speed (due to the larger lattice). @arouinfar can you please review those issues and recommend how to proceed?
UPDATE: We don't necessarily have to use the same CALIBRATION factor for the light screen history length. Let me know if you want to try a different value for it.
@samreid I don't think the calibration scale should be applied to the history length. Can you decouple them, and restore the history length to 90?
I implemented the proposed strategy in the commit, @arouinfar can you please review on phettest and close if all is well?
@samreid thanks, the decay time is now the same between master & latest, but the decay itself looks a bit different.
These gifs show the time it takes from turning off the source to the screen going black. Both cases take the same amount of time (within experimental error). In master the decay appears more suddenly, and is more gradual in latest. Mostly likely, this is related to changes in boosting the screen brightness, and may be unavoidable. If that's so, feel free to leave as-is @samreid. However, if there is some straightforward/low-cost way of making the fade more gradual like it is in latest, it might be worth tackling.
I tested 3 factors to see which contributed to this change:
I found the primary or only factor in this delayed dropoff is (3) the nonlinear function that maps intensity to brightness. When I removed the nonlinearity and adjusted the brightness by 2x, the decay happens gradually. With the nonlinearity, the decay happens suddenly because the nonlinearity is shaped like so:
That is, a gradual decrease in intensity leads to a sudden drop in brightness around intensity=0.5. However, when I remove the nonlinearity, all of the problems described in https://github.com/phetsims/wave-interference/issues/349#issuecomment-480413963 and below return.
@ariel-phet or @arouinfar can you please advise how to proceed?
Also, one more follow-up question--I noted the intensity point at intensity = 0.13, brightness = 0.7 looks a little low. I recommend bumping that up to 0.74 to round out the curve like so (if we are sticking with the nonlinear function):
@ariel-phet or @arouinfar sound OK?
@samreid that sounds like a good strategy to try.
@samreid that sounds like a good strategy to try.
Which strategy are you referring to?
UPDATE: Clarifying to provide context. In https://github.com/phetsims/wave-interference/issues/421#issuecomment-519902350 I found that the nonlinearity in the mapping from intensity to brightness is responsible for the sudden dropoff. However, the nonlinearity was introduced specifically to solve other problems described in https://github.com/phetsims/wave-interference/issues/349#issuecomment-480413963.
I found the primary or only factor in this delayed dropoff is (3) the nonlinear function that maps intensity to brightness. When I removed the nonlinearity and adjusted the brightness by 2x, the decay happens gradually. With the nonlinearity, the decay happens suddenly because the nonlinearity is shaped like so:
Ah, thanks for investigating @samreid. The non-linearity was pretty essential in reducing the appearance of interference patterns in the screen for a single source. I think the decay behavior in https://github.com/phetsims/wave-interference/issues/421#issuecomment-519718479 is an acceptable trade-off. I certainly don't love it, but I dislike it a whole lot less than single-source interference patterns.
@samreid you asked in https://github.com/phetsims/wave-interference/issues/421#issuecomment-519903944 if:
I recommend bumping that up to 0.74 to round out the curve like so (if we are sticking with the nonlinear function):
sounded OK, I was saying that seems worth trying.
Thanks, I rounded out the brightness vs intensity curve as described above. The change is subtle and may be difficult to identify during testing. I tested the behavior described in the top comment and it is basically the same.
It seems there is nothing left to do for this issue. Tagging @KatieWoe so she is aware of our (a) our decision to keep this behavior described in https://github.com/phetsims/wave-interference/issues/421#issuecomment-520285200 and (b) the minor change in the curve described in https://github.com/phetsims/wave-interference/issues/421#issuecomment-519903944.
Test device Dell Operating System Win 10 Browser Chrome Problem description For https://github.com/phetsims/QA/issues/389 (both sims) I noticed that the screen on the light scenes seems to behave differently than in the published version. The screen gets much brighter, and takes longer to go dark when the light stops. It also looks a bit odd as it goes dark. If this is the new intended behavior, please close.
Visuals Old behavior https://drive.google.com/file/d/1ayu1VQbY85iivcCTmZhqcZV6TqpNghtS/view?usp=sharing New behavior https://drive.google.com/file/d/1l_Zq1hiueCQ3TIq0DptV56EmLl6gcPSj/view?usp=sharing Troubleshooting information: