--- Dependency check [begin] ---


--- Dependency check [end] ---



--- Distribution check [begin] ---

Version 1.2.1 - 2024-10-18 (AI)
Information: this ChangeLog entry matches the version number:
 Version 1.2.1 - 2024-10-18 (AI)

Information: ./config/pyrgsspecplot.par is an XML parameter file, I cannot yet validate it. Skipped.
Warning: pyrgsspecplot - missing lyt files.
Now checking git repository...


--- Distribution check [end] ---

sed -e "s/DOC/pyrgsspecplot/" -e "s/TYPE/devel/" < \
/workspaces/xmm_sas/packages/sas/doc/lib/package.tex | /workspaces/xmm_sas/packages/sas/bin/texcombine | \
/workspaces/xmm_sas/packages/sas/bin/fixdoc -type=devel pyrgsspecplot 1.2.1 pyrgsspecplot 22.0.0-6da3b52c5-20241025 > pyrgsspecplot.tex
   including sasdevel...
      including sasglobal...
   including pyrgsspecplot_description...

latex pyrgsspecplot < /dev/null > makedoc.log || ( cat makedoc.log ; exit 1 )
bibtex pyrgsspecplot < /dev/null > makedoc.log
make[5]: [/workspaces/xmm_sas/Make.include:1062: pyrgsspecplot.ps.gz] Error 2 (ignored)
latex pyrgsspecplot < /dev/null > makedoc.log || ( cat makedoc.log ; exit 1 )
latex pyrgsspecplot < /dev/null > makedoc.log || ( cat makedoc.log ; exit 1 )
dvips -o pyrgsspecplot.ps pyrgsspecplot > makedoc.log 2>&1 || ( cat makedoc.log ; exit 1 )
dvipdf pyrgsspecplot > makedoc.log 2>&1 || ( cat makedoc.log ; continue ) 
gzip -f pyrgsspecplot.ps
SASRELDIR=../../.. ;\
export SASRELDIR ;\
latex2html -nouse_pdftex -init_file /workspaces/xmm_sas/packages/sas/doc/lib/latex2html.init pyrgsspecplot > /dev/null
texexpand V2020 (Released January 1, 2020)

Warning: No implementation found for option: `version' for `sasdoc' package

Warning: No implementation found for option: `version' for `sasdoc' package
This is dvips(k) 2021.1 (TeX Live 2022/dev)  Copyright 2021 Radical Eye Software (www.radicaleye.com)
' TeX output 2024.10.25:1609' -> images.ps
</usr/share/texlive/texmf-dist/dvips/base/tex.pro>
</usr/share/texlive/texmf-dist/dvips/l3backend/l3backend-dvips.pro>
</usr/share/texlive/texmf-dist/dvips/base/texps.pro>
</usr/share/texlive/texmf-dist/dvips/base/special.pro>. 
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb>
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>[1] 
/usr/bin/echo ""

mkpkgidx -t . > /dev/null || (rm -f pyrgsspecplot/index.pl ; exit 1)
pointer=pyrgsspecplot/ChangeLog ; \
target=../../../packages/pyrgsspecplot/ChangeLog ; \
if [ -f $target -a \( ! -h $pointer \) ] ; then \
  ln -s ../$target $pointer ; \
fi
rm pyrgsspecplot.tex
Testing testpyrgsspecplot ... FAILED
Message: will run ./testpyrgsspecplot for no longer than 600 seconds.
============================= test session starts ==============================
platform linux -- Python 3.12.4, pytest-8.3.3, pluggy-1.5.0 -- /sasbuild/tools/python-3.12.4/bin/python3
cachedir: .pytest_cache
rootdir: /workspaces/xmm_sas/packages/pyrgsspecplot
plugins: anyio-4.6.2.post1
collecting ... collected 8 items

test_pyrgsspecplot.py::test_collect_fits_info PASSED                     [ 12%]
test_pyrgsspecplot.py::test_get_src_label_and_offaxes PASSED             [ 25%]
test_pyrgsspecplot.py::test_lambda2beta PASSED                           [ 37%]
test_pyrgsspecplot.py::test_general FAILED                               [ 50%]
test_pyrgsspecplot.py::test_general_grouping PASSED                      [ 62%]
test_pyrgsspecplot.py::test_general_PDF FAILED                           [ 75%]
test_pyrgsspecplot.py::test_general_lambda PASSED                        [ 87%]
test_pyrgsspecplot.py::test_general_lambda_rebin PASSED                  [100%]

=================================== FAILURES ===================================
_________________________________ test_general _________________________________

    def test_general():
        parsed = dict()
        parsed.update({'mincounts' : '2'})
        parsed.update({'group' : 'no'})
        parsed.update({'rebin' : 'no'})
        parsed.update({'sourceid' : '1'})
        parsed.update({'device' : '/pdf'})
        parsed.update({'plotfile' : './out/spec_py.pdf'})
        parsed.update({'dark_mode' : 'yes'})
        parsed.update({'spectrumsets' : 'SPECTRUM0101.FIT SPECTRUM0102.FIT'})
        parsed.update({'sourcelistset' : 'rgssources.ds'})
>       rgsspecplot.run(parsed)

test_pyrgsspecplot.py:52: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../lib/python/pysas/pyrgsspecplot/pyrgsspecplot.py:811: in run
    status = sasplt.merge_pdf(pdf_files, plotfile + '.{}'.format(out_format))
../../../lib/python/pysas/pysasplot_utils/pysasplot_utils.py:678: in merge_pdf
    merger = PdfMerger()
/sasbuild/tools/python-3.12.4/lib/python3.12/site-packages/pypdf/_merger.py:42: in __init__
    deprecation_with_replacement("PdfMerger", "PdfWriter", "5.0.0")
/sasbuild/tools/python-3.12.4/lib/python3.12/site-packages/pypdf/_utils.py:384: in deprecation_with_replacement
    deprecation(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

msg = 'PdfMerger is deprecated and was removed in pypdf 5.0.0. Use PdfWriter instead.'

    def deprecation(msg: str) -> None:
>       raise DeprecationError(msg)
E       pypdf.errors.DeprecationError: PdfMerger is deprecated and was removed in pypdf 5.0.0. Use PdfWriter instead.

/sasbuild/tools/python-3.12.4/lib/python3.12/site-packages/pypdf/_utils.py:371: DeprecationError
----------------------------- Captured stdout call -----------------------------
Executing /workspaces/xmm_sas/lib/python/pysas/pyrgsspecplot/pyrgsspecplot.py {'mincounts': '2', 'group': 'no', 'rebin': 'no', 'sourceid': '1', 'device': '/pdf', 'plotfile': './out/spec_py.pdf', 'dark_mode': 'yes', 'spectrumsets': 'SPECTRUM0101.FIT SPECTRUM0102.FIT', 'sourcelistset': 'rgssources.ds'}
FRACEXP is missing. fracexp = 1
    No re-binning needed for this Light Curve. Input / Output time bins ratio :  1
lambda_val [ 7114.6475792  29173.9794912   6772.69043547 17191.61785237
 21175.38405337  3714.35891191 30596.4214802 ]
    cosbeta = np.cos(alpha0 + offaxis) + order * lambda_values / d 0.0274606216698885 -4.9101003e-05 -1 [ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39] 15489.455078125
    cosbeta = np.cos(alpha0 + offaxis) + order * lambda_values / d 0.0274606216698885 -4.9101003e-05 -1 [ 5 10 15 20 25 30 35 40] 15489.455078125
lambda_major: [0.03737833 0.04519873 0.05185345 0.0577469  0.06309278 0.06802031
 0.07261471 0.07693568]
betamin 0.0300083328038454 betarange 0.05000000055588331
amjorpos [0.14739988 0.30380788 0.4369023  0.55477139 0.66168895 0.76023957
 0.85212755 0.93854698]
energy major pos: [ 48.9938328   70.24840399  98.58783225 123.38483197 164.71316485
 247.36983059 495.33982784]
FRACEXP is missing. fracexp = 1
    No re-binning needed for this Light Curve. Input / Output time bins ratio :  1
lambda_val [ 7114.6475792  29173.9794912   6772.69043547 17191.61785237
 21175.38405337  3714.35891191 30596.4214802 ]
    cosbeta = np.cos(alpha0 + offaxis) + order * lambda_values / d 0.0274606216698885 -4.9101003e-05 -1 [ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39] 15489.455078125
    cosbeta = np.cos(alpha0 + offaxis) + order * lambda_values / d 0.0274606216698885 -4.9101003e-05 -1 [ 5 10 15 20 25 30 35 40] 15489.455078125
lambda_major: [0.03737833 0.04519873 0.05185345 0.0577469  0.06309278 0.06802031
 0.07261471 0.07693568]
betamin 0.0300083328038454 betarange 0.05000000055588331
amjorpos [0.14739988 0.30380788 0.4369023  0.55477139 0.66168895 0.76023957
 0.85212755 0.93854698]
energy major pos: [ 48.9938328   70.24840399  98.58783225 123.38483197 164.71316485
 247.36983059 495.33982784]
----------------------------- Captured stderr call -----------------------------
pyrgsspecplot - WARNING - Mismatch between device parameter and the extension given in the plotfile parameter. pdf will be used.
pyrgsspecplot - WARNING - SPECDELT not found
pyrgsspecplot - WARNING - SPECPIX not found
pyrgsspecplot - WARNING - SPECVAL not found
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-sasbuild'
pyrgsspecplot - WARNING - SPECDELT not found
pyrgsspecplot - WARNING - SPECPIX not found
pyrgsspecplot - WARNING - SPECVAL not found
------------------------------ Captured log call -------------------------------
WARNING  pyrgsspecplot:logger.py:158 Mismatch between device parameter and the extension given in the plotfile parameter. pdf will be used.
INFO     pyrgsspecplot:logger.py:158 Evaluating file SPECTRUM0101.FIT.
DEBUG    pyrgsspecplot:logger.py:158 Filtering data using pyutils...
DEBUG    pyrgsspecplot:logger.py:158 Getting source label and offaxis values from rgssources.ds with id 1.
WARNING  pyrgsspecplot:logger.py:158 SPECDELT not found
WARNING  pyrgsspecplot:logger.py:158 SPECPIX not found
WARNING  pyrgsspecplot:logger.py:158 SPECVAL not found
DEBUG    pyrgsspecplot:logger.py:158 RATE-like spectrum...
DEBUG    pyrgsspecplot:logger.py:158 Looking for XMM misc data...
DEBUG    pyrgsspecplot:logger.py:158 Starting graph processing...
DEBUG    pyrgsspecplot:logger.py:158 Getting passed data.
DEBUG    pyrgsspecplot:logger.py:158 Only one table for error and data.
DEBUG    pyrgsspecplot:logger.py:158 1 3000
DEBUG    pyrgsspecplot:logger.py:158 Saving /workspaces/xmm_sas/packages/pyrgsspecplot/test/out/spec_py_1_TEMP_SPECPLOT.pdf.
INFO     pyrgsspecplot:logger.py:158 Evaluating file SPECTRUM0102.FIT.
DEBUG    pyrgsspecplot:logger.py:158 Filtering data using pyutils...
DEBUG    pyrgsspecplot:logger.py:158 Getting source label and offaxis values from rgssources.ds with id 1.
WARNING  pyrgsspecplot:logger.py:158 SPECDELT not found
WARNING  pyrgsspecplot:logger.py:158 SPECPIX not found
WARNING  pyrgsspecplot:logger.py:158 SPECVAL not found
DEBUG    pyrgsspecplot:logger.py:158 RATE-like spectrum...
DEBUG    pyrgsspecplot:logger.py:158 Looking for XMM misc data...
DEBUG    pyrgsspecplot:logger.py:158 Starting graph processing...
DEBUG    pyrgsspecplot:logger.py:158 Getting passed data.
DEBUG    pyrgsspecplot:logger.py:158 Only one table for error and data.
DEBUG    pyrgsspecplot:logger.py:158 1 3000
DEBUG    pyrgsspecplot:logger.py:158 Saving /workspaces/xmm_sas/packages/pyrgsspecplot/test/out/spec_py_2_TEMP_SPECPLOT.pdf.
INFO     pyrgsspecplot:logger.py:158 Merging existing PDFs...
_______________________________ test_general_PDF _______________________________

    def test_general_PDF():
        parsed = dict()
        parsed.update({'mincounts' : '5'})
        parsed.update({'group' : 'no'})
        parsed.update({'rebin' : 'yes'})
        parsed.update({'sourceid' : '1'})
        parsed.update({'device' : 'pdf'})
        parsed.update({'plotfile' : './out/spec_pyrebin5.pdf'})
        parsed.update({'dark_mode' : 'yes'})
        parsed.update({'spectrumsets' : 'SPECTRUM0101.FIT, SPECTRUM0102.FIT'})
        parsed.update({'sourcelistset' : 'rgssources.ds'})
>       rgsspecplot.run(parsed)

test_pyrgsspecplot.py:82: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../lib/python/pysas/pyrgsspecplot/pyrgsspecplot.py:811: in run
    status = sasplt.merge_pdf(pdf_files, plotfile + '.{}'.format(out_format))
../../../lib/python/pysas/pysasplot_utils/pysasplot_utils.py:678: in merge_pdf
    merger = PdfMerger()
/sasbuild/tools/python-3.12.4/lib/python3.12/site-packages/pypdf/_merger.py:42: in __init__
    deprecation_with_replacement("PdfMerger", "PdfWriter", "5.0.0")
/sasbuild/tools/python-3.12.4/lib/python3.12/site-packages/pypdf/_utils.py:384: in deprecation_with_replacement
    deprecation(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

msg = 'PdfMerger is deprecated and was removed in pypdf 5.0.0. Use PdfWriter instead.'

    def deprecation(msg: str) -> None:
>       raise DeprecationError(msg)
E       pypdf.errors.DeprecationError: PdfMerger is deprecated and was removed in pypdf 5.0.0. Use PdfWriter instead.

/sasbuild/tools/python-3.12.4/lib/python3.12/site-packages/pypdf/_utils.py:371: DeprecationError
----------------------------- Captured stdout call -----------------------------
Executing /workspaces/xmm_sas/lib/python/pysas/pyrgsspecplot/pyrgsspecplot.py {'mincounts': '5', 'group': 'no', 'rebin': 'yes', 'sourceid': '1', 'device': 'pdf', 'plotfile': './out/spec_pyrebin5.pdf', 'dark_mode': 'yes', 'spectrumsets': 'SPECTRUM0101.FIT, SPECTRUM0102.FIT', 'sourcelistset': 'rgssources.ds'}
lambda_val [ 7114.6475792  29173.9794912   6772.69043547 17191.61785237
 21175.38405337  3714.35891191 30596.4214802 ]
    cosbeta = np.cos(alpha0 + offaxis) + order * lambda_values / d 0.0274606216698885 -4.9101003e-05 -1 [ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39] 15489.455078125
    cosbeta = np.cos(alpha0 + offaxis) + order * lambda_values / d 0.0274606216698885 -4.9101003e-05 -1 [ 5 10 15 20 25 30 35 40] 15489.455078125
lambda_major: [0.03737833 0.04519873 0.05185345 0.0577469  0.06309278 0.06802031
 0.07261471 0.07693568]
betamin 0.03002499947069736 betarange 0.05000833388930929
amjorpos [0.14704204 0.30342398 0.43649622 0.55434566 0.66124541 0.75977961
 0.85165227 0.93805731]
energy major pos: [ 48.98533524  70.2363646   98.5710704  123.36393798 164.68538395
 247.32827588 495.25695168]
lambda_val [ 7114.6475792  29173.9794912   6772.69043547 17191.61785237
 21175.38405337  3714.35891191 30596.4214802 ]
    cosbeta = np.cos(alpha0 + offaxis) + order * lambda_values / d 0.0274606216698885 -4.9101003e-05 -1 [ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39] 15489.455078125
    cosbeta = np.cos(alpha0 + offaxis) + order * lambda_values / d 0.0274606216698885 -4.9101003e-05 -1 [ 5 10 15 20 25 30 35 40] 15489.455078125
lambda_major: [0.03737833 0.04519873 0.05185345 0.0577469  0.06309278 0.06802031
 0.07261471 0.07693568]
betamin 0.03002499947069736 betarange 0.05000833388930929
amjorpos [0.14704204 0.30342398 0.43649622 0.55434566 0.66124541 0.75977961
 0.85165227 0.93805731]
energy major pos: [ 48.98533524  70.2363646   98.5710704  123.36393798 164.68538395
 247.32827588 495.25695168]
----------------------------- Captured stderr call -----------------------------
pyrgsspecplot - WARNING - Mismatch between device parameter and the extension given in the plotfile parameter. pdf will be used.
pyrgsspecplot - WARNING - SPECDELT not found
pyrgsspecplot - WARNING - SPECPIX not found
pyrgsspecplot - WARNING - SPECVAL not found
pyrgsspecplot - WARNING - SPECDELT not found
pyrgsspecplot - WARNING - SPECPIX not found
pyrgsspecplot - WARNING - SPECVAL not found
------------------------------ Captured log call -------------------------------
WARNING  pyrgsspecplot:logger.py:158 Mismatch between device parameter and the extension given in the plotfile parameter. pdf will be used.
INFO     pyrgsspecplot:logger.py:158 Evaluating file SPECTRUM0101.FIT.
DEBUG    pyrgsspecplot:logger.py:158 Filtering data using pyutils...
DEBUG    pyrgsspecplot:logger.py:158 Getting source label and offaxis values from rgssources.ds with id 1.
WARNING  pyrgsspecplot:logger.py:158 SPECDELT not found
WARNING  pyrgsspecplot:logger.py:158 SPECPIX not found
WARNING  pyrgsspecplot:logger.py:158 SPECVAL not found
DEBUG    pyrgsspecplot:logger.py:158 RATE-like spectrum...
INFO     pyrgsspecplot:logger.py:158 Rebinning for file SPECTRUM0101.FIT.
DEBUG    pyrgsspecplot:logger.py:158 Running rebbin_min_counts.
DEBUG    pyrgsspecplot:logger.py:158 Looking for XMM misc data...
DEBUG    pyrgsspecplot:logger.py:158 Starting graph processing...
DEBUG    pyrgsspecplot:logger.py:158 Getting passed data.
DEBUG    pyrgsspecplot:logger.py:158 Rebinned - separated tables for error and data.
DEBUG    pyrgsspecplot:logger.py:158 1 2694
DEBUG    pyrgsspecplot:logger.py:158 Saving /workspaces/xmm_sas/packages/pyrgsspecplot/test/out/spec_pyrebin5_1_TEMP_SPECPLOT.pdf.
INFO     pyrgsspecplot:logger.py:158 Evaluating file SPECTRUM0102.FIT.
DEBUG    pyrgsspecplot:logger.py:158 Filtering data using pyutils...
DEBUG    pyrgsspecplot:logger.py:158 Getting source label and offaxis values from rgssources.ds with id 1.
WARNING  pyrgsspecplot:logger.py:158 SPECDELT not found
WARNING  pyrgsspecplot:logger.py:158 SPECPIX not found
WARNING  pyrgsspecplot:logger.py:158 SPECVAL not found
DEBUG    pyrgsspecplot:logger.py:158 RATE-like spectrum...
INFO     pyrgsspecplot:logger.py:158 Rebinning for file SPECTRUM0102.FIT.
DEBUG    pyrgsspecplot:logger.py:158 Running rebbin_min_counts.
DEBUG    pyrgsspecplot:logger.py:158 Looking for XMM misc data...
DEBUG    pyrgsspecplot:logger.py:158 Starting graph processing...
DEBUG    pyrgsspecplot:logger.py:158 Getting passed data.
DEBUG    pyrgsspecplot:logger.py:158 Rebinned - separated tables for error and data.
DEBUG    pyrgsspecplot:logger.py:158 1 2705
DEBUG    pyrgsspecplot:logger.py:158 Saving /workspaces/xmm_sas/packages/pyrgsspecplot/test/out/spec_pyrebin5_2_TEMP_SPECPLOT.pdf.
INFO     pyrgsspecplot:logger.py:158 Merging existing PDFs...
=============================== warnings summary ===============================
test/test_pyrgsspecplot.py::test_general
test/test_pyrgsspecplot.py::test_general
test/test_pyrgsspecplot.py::test_general_PDF
test/test_pyrgsspecplot.py::test_general_PDF
  /workspaces/xmm_sas/lib/python/pysas/pyrgsspecplot/pyrgsspecplot.py:705: RuntimeWarning: invalid value encountered in multiply
    counts_p = exposuret * rate_p

test/test_pyrgsspecplot.py::test_general_grouping
  /workspaces/xmm_sas/lib/python/pysas/pyrgsspecplot/pyrgsspecplot.py:750: RuntimeWarning: overflow encountered in scalar add
    summed_channels[bin_c] = summed_channels[bin_c] + channel_p[i - 1]

test/test_pyrgsspecplot.py::test_general_grouping
  /workspaces/xmm_sas/lib/python/pysas/pyrgsspecplot/pyrgsspecplot.py:762: RuntimeWarning: invalid value encountered in divide
    channel = np.divide(summed_channels, n_channels)

test/test_pyrgsspecplot.py::test_general_grouping
test/test_pyrgsspecplot.py::test_general_lambda
test/test_pyrgsspecplot.py::test_general_lambda_rebin
  /workspaces/xmm_sas/lib/python/pysas/pyrgsspecplot/pyrgsspecplot.py:180: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator.
    ax1.xaxis.set_ticklabels(np.around(lamb_values, 2))

test/test_pyrgsspecplot.py::test_general_PDF
test/test_pyrgsspecplot.py::test_general_PDF
test/test_pyrgsspecplot.py::test_general_lambda_rebin
  /workspaces/xmm_sas/lib/python/pysas/pyrgsspecplot/pyrgsspecplot.py:284: RuntimeWarning: overflow encountered in scalar add
    newchannel[k] = newchannel[k] + t[i][xcol]

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED test_pyrgsspecplot.py::test_general - pypdf.errors.DeprecationError: P...
FAILED test_pyrgsspecplot.py::test_general_PDF - pypdf.errors.DeprecationErro...
================== 2 failed, 6 passed, 12 warnings in 12.57s ===================
Error while running ./testpyrgsspecplot
ERROR: one of the tests failed