Field Analysis flatness and symmetry results (v3.0rc1)


I may be missing something, but I can’t find where to access the flatness and symmetry results from the Field Analysis module in v3.0rc1.

They are printed to the console in results() and show up in the PDF report, but they seem to be missing from the results_data dictionary.

Thanks for any insight!

Hi Jackson, it looks like there’s a bug when converting to a dictionary that doesn’t include the extra attrs I attached on the fly.

When used not as a dict:

fa = FieldAnalysis…
d = fa.results_data()

then we can access the flatness and symmetry values like so: d.flatness_horizontal, d.flatness_vertical, d.symmetry_vertical, d.symmetry_horizontal

However, because these attrs are added on the fly they are not true dataclasses attrs and it looks like when it gets converted to a dict then it drops those extra attrs. I’ll have a bugfix up soon.

Thanks for reporting.

Cool, thanks for the tip on accessing it through the results_data object. I briefly searched the object attributes, but I guess I only used iPython live introspection, which didn’t show it.

Interesting. When I use JupyterLab and for autocompletion I get the attached. What version are you using?

Bug is fixed and v3.0 should be out shortly.

Screenshot 2021-08-04 082016.png

I was trying to “run” the function and see the attributes all in a single line, as shown in the attachment. That way must use some shortcut to show the object’s attributes (I guess it doesn’t actually run the function). When I actually defined the object as a variable, as you did, I could see all its attributes, including flatness and symmetry. Operator error :slight_smile:

ipython capture.PNG