Skip to content

Partly revert the change with the referencing of diagonal solutions, …#199

Merged
revoltek merged 1 commit into
masterfrom
fix_FJ_ref+reset
Apr 27, 2026
Merged

Partly revert the change with the referencing of diagonal solutions, …#199
revoltek merged 1 commit into
masterfrom
fix_FJ_ref+reset

Conversation

@henedler

Copy link
Copy Markdown
Collaborator

Partially revert my recent changes regarding the referencing of diagonal solutions: Per default, X and Y will now be again referenced independently, but there is the preservePol argument added. If specified, referencing happens only to X, such that the X-Y information is preserved.

@github-actions

Copy link
Copy Markdown

badge

Code Coverage Summary

Details
Filename                               Stmts    Miss  Cover    Missing
-----------------------------------  -------  ------  -------  -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
__init__.py                                1       0  100.00%
_importer.py                             312     312  0.00%    15-496
_logging.py                               63      41  34.92%   19-24, 27, 30-32, 38-42, 46-58, 63-77, 80-87
_version.py                               11       0  100.00%
h5parm.py                                667     274  58.92%   14-15, 40-47, 99, 111-112, 114, 118, 156, 178-179, 253-254, 295, 332-334, 343-345, 348-349, 353-354, 365, 371, 376-377, 384, 393, 396-401, 409-416, 424-425, 428, 445-446, 454, 476-478, 516, 520-521, 555-560, 648, 651, 668-669, 686-687, 708-720, 746-747, 767-768, 793-795, 807-808, 832, 839, 874, 878-884, 891-892, 894-895, 900-908, 910, 926-927, 936, 940-941, 1005-1006, 1057-1058, 1084-1085, 1118-1124, 1138, 1140, 1142, 1183-1199, 1233-1234, 1244-1307, 1314-1349, 1356-1405, 1491-1517, 1539-1541, 1547
lib_losoto.py                            148     114  22.97%   14, 32-38, 44-50, 53-58, 61-66, 69-74, 77-82, 85-100, 103-106, 109-112, 115-118, 121-124, 130-138, 164-192, 217-245, 261-266
lib_operations.py                         26      19  26.92%   17-20, 43-45, 64-68, 87-96
lib_unwrap.py                            106      96  9.43%    22-51, 59-97, 105-131, 144-147, 152-165, 172-183
phase_colormap.py                          3       3  0.00%    1-260
operations/__init__.py                    19       9  52.63%   19-22, 25-27, 32-33
operations/_faraday_timestep.py           34      27  20.59%   8, 11-48
operations/_fitClockTEC.py               643     615  4.35%    12, 22-29, 32-39, 43-52, 56-75, 79-95, 100-191, 203-268, 281-416, 429-564, 573-579, 583-600, 605-613, 623-660, 663-671, 676, 699-936
operations/abs.py                         15       2  86.67%   10-11
operations/clip.py                        48      39  18.75%   10-16, 43, 49-101
operations/clocktec.py                    86      72  16.28%   12-28, 74-75, 82-172
operations/deleteaxis.py                  43      38  11.63%   10-14, 29-72
operations/duplicate.py                   19       6  68.42%   10-14, 33-34
operations/faraday.py                     78      59  24.36%   13-19, 22, 55-128
operations/flag.py                       200     192  4.00%    13-28, 33-283, 333-386
operations/flagextend.py                  53      46  13.21%   12-19, 30-63, 92-121
operations/flagstation.py                406     396  2.46%    14-29, 73-150, 207-521, 587-840
operations/interpolate.py                 89      82  7.87%    10-18, 41-46, 63-80, 112-184
operations/interpolatedirections.py      122     111  9.02%    18-24, 28, 109-143, 162-317
operations/lofarbeam.py                   46      41  10.87%   13-19, 35-86
operations/norm.py                        33      28  15.15%   10-15, 33-69
operations/plot.py                       366     357  2.46%    14-35, 40-224, 290-626
operations/polalign.py                    70      53  24.29%   10-15, 41-42, 45-47, 60-162
operations/reference.py                   30      23  23.33%   10-15, 33-34, 37-58
operations/replicateonaxis.py             50      45  10.00%   10-15, 35-90
operations/reset.py                       33      20  39.39%   10-13, 44-65
operations/residuals.py                   81      76  6.17%    17-21, 38-157
operations/reweight.py                   133     116  12.78%   12-21, 27-35, 60-70, 91-162, 194-208, 214-243, 246-250
operations/smooth.py                     123     117  4.88%    10-19, 23-39, 71-217
operations/structure.py                  109      91  16.51%   10-16, 45-46, 49-51, 53-54, 69-173
operations/tec.py                        123     107  13.01%   16-23, 28, 46-52, 69-75, 95-182, 207-372
TOTAL                                   4389    3627  17.36%

Diff against master

Filename                   Stmts    Miss  Cover
-----------------------  -------  ------  -------
h5parm.py                     +1      +1  -0.09%
operations/reference.py       +1      +1  -0.81%
TOTAL                         +2      +2  -0.01%

Results for commit: 8376733

Minimum allowed coverage is 0%

♻️ This comment has been updated with latest results

@revoltek revoltek merged commit 2c00e2d into master Apr 27, 2026
4 checks passed
Comment thread losoto/h5parm.py
Comment on lines +1294 to +1296
ref_pol = False
if 'XX' in self.getAxisValues('pol'): ref_pol = 'XX'
elif 'RR' in self.getAxisValues('pol'): ref_pol = 'RR'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 , changing the type of a variable is not very nice (though allowed by Python). Why not initialize it to an empty string?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants