Closed pixelzoom closed 4 years ago
I also see the "pLD" abbreviation in a few other places: computepLD
, computepLDWavelengths
, parameter pLD
, pLDRegion1
, pLDRegion2
,... If this is a standard abbreviation for this domain, it would be good to note in implementation-notes.md. If it's non-standard, consider replacing it with something more verbose/descriptive.
PLD is my abbreviation for path length difference. It is how much farther the lower ray travels than the upper ray. In order for the reflected rays to be in phase (and thus not cancel out) this has to be and integer multiple of the wavelength.
Enough physics. For now, I will just capitalize PLD when it is not at the start. Other than that, I am certainly willing to change the name, but I think having a function name like computePathLengthDifferenceInWavelengths makes the code a little hard to read. What do you thing?
I also went ahead and added a sentence in implementation-notes.md.
If it's a standard abbreviation, then PLD is certainly appropriate to use. Thanks for adding to implementation-notes.md!
By the way... PhET doesn't have a standard or template for implementation-notes.md, so they are a bit inconsistent. But I usually include a "Terminology" section, where things like "path length difference (PLD)" are defined. There's no need to change your implementation-notes.md. But if you want to take a peek at a couple of other examples:
https://github.com/phetsims/gas-properties/blob/master/doc/implementation-notes.md https://github.com/phetsims/equality-explorer/blob/master/doc/implementation-notes.md
... are a couple for recent sims where I've been the primary developer.
Yes, your implementation notes are beautiful. I tried to copy them, but they will need more work. I'm sure they will improve.
Related to #1 (code review):
Overall good naming, but there are a couple of places that could be improved.
In XrayDiffractionModel.js, I'm guessing that "pLD" is an abbreviation for something:
In LightPathNode.js, these could benefit from better names, or documentation describing them: