openmc.ZernikeFilter¶

class openmc.ZernikeFilter(order, x=0.0, y=0.0, r=1.0, filter_id=None)[source]

Score Zernike expansion moments in space up to specified order.

This filter allows scores to be multiplied by Zernike polynomials of the particle’s position normalized to a given unit circle, up to a user-specified order. The standard Zernike polynomials follow the definition by Born and Wolf, Principles of Optics and are defined as

$Z_n^m(\rho, \theta) = R_n^m(\rho) \cos (m\theta), \quad m > 0 Z_n^{m}(\rho, \theta) = R_n^{m}(\rho) \sin (m\theta), \quad m < 0 Z_n^{m}(\rho, \theta) = R_n^{m}(\rho), \quad m = 0$

$R_n^m(\rho) = \sum\limits_{k=0}^{(n-m)/2} \frac{(-1)^k (n-k)!}{k! ( \frac{n+m}{2} - k)! (\frac{n-m}{2} - k)!} \rho^{n-2k}.$

With this definition, the integral of $$(Z_n^m)^2$$ over the unit disk is $$\frac{\epsilon_m\pi}{2n+2}$$ for each polynomial where $$\epsilon_m$$ is 2 if $$m$$ equals 0 and 1 otherwise.

Specifying a filter with order N tallies moments for all $$n$$ from 0 to N and each value of $$m$$. The ordering of the Zernike polynomial moments follows the ANSI Z80.28 standard, where the one-dimensional index $$j$$ corresponds to the $$n$$ and $$m$$ by

$j = \frac{n(n + 2) + m}{2}.$
Parameters
• order (int) – Maximum Zernike polynomial order

• x (float) – x-coordinate of center of circle for normalization

• y (float) – y-coordinate of center of circle for normalization

• r (float) – Radius of circle for normalization

Variables
• order (int) – Maximum Zernike polynomial order

• x (float) – x-coordinate of center of circle for normalization

• y (float) – y-coordinate of center of circle for normalization

• r (float) – Radius of circle for normalization

• id (int) – Unique identifier for the filter

• num_bins (int) – The number of filter bins

classmethod from_hdf5(group, **kwargs)[source]

Construct a new Filter instance from HDF5 data.

Parameters

group (h5py.Group) – HDF5 group to read from

Keyword Arguments

meshes (dict) – Dictionary mapping integer IDs to openmc.MeshBase objects. Only used for openmc.MeshFilter objects.

classmethod from_xml_element(elem, **kwargs)[source]

Generate a filter from an XML element

Parameters
Returns

Filter object

Return type

openmc.Filter

to_xml_element()[source]

Return XML Element representing the filter.

Returns

element – XML element containing Zernike filter data

Return type

xml.etree.ElementTree.Element
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.18165498971939087, "perplexity": 4853.813803959217}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-21/segments/1652662526009.35/warc/CC-MAIN-20220519074217-20220519104217-00350.warc.gz"}