Closed jwbishop closed 4 years ago
Essentially no elements are flagged for the example with alpha=0.75. Is this correct? I'm surprised.
When ALPHA=1.0 in the example, stdict is not "None" as expected. Instead it returns "{'size': 6}".
When ALPHA=1.0 in the example, stdict is not "None" as expected. Instead it returns "{'size': 6}".
This was actually done on purpose to preserve the output types, i.e. a dictionary is consistently returned. In the case of ordinary least squares, it's an empty dictionary. As in the array_processing plotting script, I expect the plotting default stdict=None behavior to be used when the station pair plot is undesired. For least squares, the output stdict variable can be ignored entirely by assigning it to
__
in the tuple unpacking.Does that make sense?
OK, but then if stdict is not None:
on line 87 of lts_array_plot.py does not pass and it still tries to plot the element pairs subplot. Try the example with alpha=1.0 and you'll see what I mean.
When ALPHA=1.0 in the example, stdict is not "None" as expected. Instead it returns "{'size': 6}".
This was actually done on purpose to preserve the output types, i.e. a dictionary is consistently returned. In the case of ordinary least squares, it's an empty dictionary. As in the array_processing plotting script, I expect the plotting default stdict=None behavior to be used when the station pair plot is undesired. For least squares, the output stdict variable can be ignored entirely by assigning it to
__
in the tuple unpacking. Does that make sense?OK, but then
if stdict is not None:
on line 87 of lts_array_plot.py does not pass and it still tries to plot the element pairs subplot. Try the example with alpha=1.0 and you'll see what I mean.
Are you still passing a station dictionary as an argument to the plotting script? That will not evaluate as None, so the plotting script will attempt to plot the empty dictionary. I can fix this by adding an additional check for empty dictionaries. This should be done for the array_processing plotting script as well.
When ALPHA=1.0 in the example, stdict is not "None" as expected. Instead it returns "{'size': 6}".
This was actually done on purpose to preserve the output types, i.e. a dictionary is consistently returned. In the case of ordinary least squares, it's an empty dictionary. As in the array_processing plotting script, I expect the plotting default stdict=None behavior to be used when the station pair plot is undesired. For least squares, the output stdict variable can be ignored entirely by assigning it to
__
in the tuple unpacking. Does that make sense?OK, but then
if stdict is not None:
on line 87 of lts_array_plot.py does not pass and it still tries to plot the element pairs subplot. Try the example with alpha=1.0 and you'll see what I mean.Are you still passing a station dictionary as an argument to the plotting script? That will not evaluate as None, so the plotting script will attempt to plot the empty dictionary. I can fix this by adding an additional check for empty dictionaries. This should be done for the array_processing plotting script as well.
Fixed. This was actually an issue where ltsva
was not returning a truly empty dictionary for least squares processing.
Updates the order of ltsva output. Updates plotting for optional station dictionary input (addresses #5 ). Adjusts example to recommended default alpha = 0.75.