pyIntensityFeatures.tests.test_main =================================== .. py:module:: pyIntensityFeatures.tests.test_main .. autoapi-nested-parse:: Tests for functions in `_main`. .. !! processed by numpydoc !! Classes ------- .. autoapisummary:: pyIntensityFeatures.tests.test_main.TestAuroralBounds Functions --------- .. autoapisummary:: pyIntensityFeatures.tests.test_main.clean_func Module Contents --------------- .. py:function:: clean_func(inst_data, clean_var='clean_flag', bad_val=1) Clean data as a test for the `clean_func` attribute. :Parameters: **inst_data** : dict, list, array, pds.DataFrame, or xr.Dataset Instrument data **clean_var** : str or int Data variable with the clean flag (default='clean_flag') **bad_val** : float or int Values to flag as bad (default=1) :Returns: **clean_mask** : 2D array or NoneType Cleaning mask output .. !! processed by numpydoc !! .. py:class:: TestAuroralBounds(methodName='runTest') Bases: :py:obj:`unittest.TestCase` Tests for the AuroralBounds class. .. !! processed by numpydoc !! .. py:method:: setUp() Set up the test runs. .. !! processed by numpydoc !! .. py:method:: tearDown() Tear down the test environment. .. !! processed by numpydoc !! .. py:method:: set_inst_data(class_name='dict') Set the `inst_data` attribute and vars using the desired class. :Parameters: **class_name** : str String specifying one of 'dict', 'list', 'array', 'pandas', or 'xarray' (default='dict') .. !! processed by numpydoc !! .. py:method:: set_alb(set_attr=True) Set the ALB test attribute for the tests. set_attr : bool If True, set the `alb` attribute, if False return the class object .. !! processed by numpydoc !! .. py:method:: eval_times(class_name='dict') Evaluate times based on the input. :Parameters: **class_name** : str String specifying one of 'dict', 'list', 'array', 'pandas', or 'xarray' (default='dict') .. !! processed by numpydoc !! .. py:method:: eval_boundaries(min_mlat_base=59.0, mlat_inc=1.0, mag_method='ALLOWTRACE', mlt_inc=0.5, un_threshold=1.25, strict_fit=0, lt_out_bin=5.0, max_iqr=1.5) Evaluate successful setting of boundaries. :Parameters: **min_mlat_base** : float Base minimum co-latitude for intensity profiles. (default=59.0) **method** : str Method for converting between geographic and magnetic coordinates. (default='ALLOWTRACE') **mlat_inc** : float Magnetic latitude increment for gridding intensity. (default=1.0) **mlt_inc** : float Magnetic local time increment for gridding intensity. (default=0.5) **un_threshold** : float Maximum acceptable uncertainty value in degrees (default=1.25) **strict_fit** : int Enforce positive values for the x-offsets in quadratic-Gaussian fits using integer version of boolean (default=0) **lt_out_bin** : float Size of local time bin in hours over which outliers in the data will be identified (default=5.0) **max_iqr** : float Maximum multiplier for the interquartile range (IQR) used to identify outliers above or below the upper or lower quartile (default=1.5) .. !! processed by numpydoc !! .. py:method:: test_init_empty_data() Test initialization of the class with an empty data object. .. !! processed by numpydoc !! .. py:method:: test_repr_string() Test __repr__ method string. .. !! processed by numpydoc !! .. py:method:: test_print_string() Test __str__ method string. .. !! processed by numpydoc !! .. py:method:: test_equality() Test class equality with empty data objects. .. !! processed by numpydoc !! .. py:method:: test_inequality_wrong_class() Test class equality with different classes. .. !! processed by numpydoc !! .. py:method:: test_inequality_extra_attributes() Test class equality with extra attributes. .. !! processed by numpydoc !! .. py:method:: test_inequality_missing_attributes() Test class equality with missing attributes. .. !! processed by numpydoc !! .. py:method:: test_inequality_attributes() Test class equality with unequal standard attributes. .. !! processed by numpydoc !! .. py:method:: test_update_properties() Test properties can be updated to different values. .. !! processed by numpydoc !! .. py:method:: test_init_with_data() Test times are set based on data when data is available. .. !! processed by numpydoc !! .. py:method:: test_init_with_transposed_data() Test times are set based on data when data is available. .. !! processed by numpydoc !! .. py:method:: test_update_times_with_data() Test times are set based on data when data is available. .. !! processed by numpydoc !! .. py:method:: test_set_boundaries_empty_data() Test initialization of the class with an empty data object. .. !! processed by numpydoc !! .. py:method:: test_set_boundaries_with_data() Test setting boundaries from data. .. !! processed by numpydoc !! .. py:method:: test_set_boundaries_with_long_end_time() Test setting boundaries with an end time beyond the data. .. !! processed by numpydoc !! .. py:method:: test_set_boundaries_with_data_no_slice() Test setting boundaries from data without slicing. .. !! processed by numpydoc !! .. py:method:: test_set_boundaries_with_mask() Test setting boundaries from data while masking all data. .. !! processed by numpydoc !!