diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 09b1d90..aee2c33 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -41,5 +41,14 @@ jobs: activate-environment: superdsm environment-file: superdsm.yml + - name: Export the environment + run: 'conda env export | grep -v "^prefix: " > superdsm.yml' + + - name: Save the environment as an artifact + uses: actions/upload-artifact@v4 + with: + name: superdsm.yml + path: superdsm.yml + - name: Run SuperDSM run: python -m "unittest" diff --git a/requirements.txt b/requirements.txt index 1609b78..9ebdb42 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ -numpy==1.20 -scipy==1.6.3 -scikit-image==0.18.1 +numpy==1.26 +scipy==1.13.1 +scikit-image==0.24.0 ipython>=7.31.1 dill==0.3.2 ray>=0.8.7 -cvxopt==1.2.7 -cvxpy==1.1.13 +cvxopt==1.3.2 +cvxpy==1.5.3 matplotlib>=3.0 mkl>=2020.0 -imagecodecs==2022.9.26 +imagecodecs==2024.6.1 diff --git a/superdsm.yml b/superdsm.yml index dd3ff56..730ed9a 100644 --- a/superdsm.yml +++ b/superdsm.yml @@ -6,198 +6,242 @@ channels: dependencies: - _libgcc_mutex=0.1=conda_forge - _openmp_mutex=4.5=2_kmp_llvm -- alsa-lib=1.2.3.2=h166bdaf_0 -- aom=3.5.0=h27087fc_0 +- alsa-lib=1.2.12=h4ab18f5_0 +- aom=3.9.1=hac33072_0 - asttokens=2.4.1=pyhd8ed1ab_0 +- attr=2.5.1=h166bdaf_1 - backcall=0.2.0=pyh9f0ad1d_0 - blas=1.0=mkl -- blosc=1.21.5=h0f2a231_0 -- brotli=1.0.9=h166bdaf_9 -- brotli-bin=1.0.9=h166bdaf_9 -- brotli-python=1.0.9=py38hfa26641_9 +- blosc=1.21.6=hef167b5_0 +- brotli=1.1.0=hb9d3cd8_2 +- brotli-bin=1.1.0=hb9d3cd8_2 - brunsli=0.1=h9c3ff4c_0 -- bzip2=1.0.8=hd590300_5 -- c-ares=1.26.0=hd590300_0 -- c-blosc2=2 -- ca-certificates=2024.2.2=hbcca054_0 -- certifi=2024.2.2=pyhd8ed1ab_0 -- cfitsio=4.1.0=hd9d235c_0 -- charls=2.3.4=h9c3ff4c_0 -- charset-normalizer=3.3.2=pyhd8ed1ab_0 -- click=8.1.7=unix_pyh707e725_0 -- cloudpickle=3.0.0=pyhd8ed1ab_0 -- contourpy=1.1.1=py38h7f3f72f_1 -- cvxopt=1.2.7 -- cvxpy=1.1.13=py38h578d9bd_0 -- cvxpy-base=1.1.13=py38h1abd341_0 +- bzip2=1.0.8=h4bc722e_7 +- c-blosc2=2.15.1=hc57e6cf_0 +- ca-certificates=2024.8.30=hbcca054_0 +- cairo=1.18.0=hbb29018_2 +- certifi=2024.8.30=pyhd8ed1ab_0 +- charls=2.4.2=h59595ed_0 +- clarabel=0.7.1=py311h7e2346c_0 +- contourpy=1.3.0=py311hd18a35c_1 +- cvxopt=1.3.2=py311he0106dc_3 +- cvxpy=1.5.3=py311h38be061_0 +- cvxpy-base=1.5.3=py311h044e617_0 - cycler=0.12.1=pyhd8ed1ab_0 -- cytoolz=0.12.3=py38h01eb140_0 -- dask-core=2023.5.0=pyhd8ed1ab_0 -- dav1d=1.0.0=h166bdaf_1 -- dbus=1.13.6=hfdff14a_1 +- dav1d=1.2.1=hd590300_0 +- dbus=1.13.6=h5008d03_3 - decorator=5.1.1=pyhd8ed1ab_0 - dill=0.3.2=pyh9f0ad1d_0 - dsdp=5.8=hd9d9efa_1203 -- ecos=2.0.10=py38h71d37f0_1 -- executing=2.0.1=pyhd8ed1ab_0 -- expat=2.5.0=hcb278e6_1 -- fftw=3.3.10=nompi_hc118613_108 +- ecos=2.0.14=py311h18e1886_0 +- executing=2.1.0=pyhd8ed1ab_0 +- expat=2.6.2=h59595ed_0 +- fftw=3.3.10=nompi_hf1063bd_110 +- font-ttf-dejavu-sans-mono=2.37=hab24e00_0 +- font-ttf-inconsolata=3.000=h77eed37_0 +- font-ttf-source-code-pro=2.038=h77eed37_0 +- font-ttf-ubuntu=0.83=h77eed37_2 - fontconfig=2.14.2=h14ed4e7_0 -- fonttools=4.48.1=py38h01eb140_0 +- fonts-conda-ecosystem=1=0 +- fonts-conda-forge=1=0 +- fonttools=4.53.1=py311h9ecbd09_1 - freetype=2.12.1=h267a509_2 -- fsspec=2024.2.0=pyhca7485f_0 -- gettext=0.21.1=h27087fc_0 -- giflib=5.2.1=h0b41bf4_3 -- glib=2.66.3=h58526e2_0 -- glpk=4.65=h9202a9a_1004 -- gmp=6.3.0=h59595ed_0 +- gettext=0.22.5=he02047a_3 +- gettext-tools=0.22.5=he02047a_3 +- giflib=5.2.2=hd590300_0 +- glib=2.80.3=h315aac3_2 +- glib-tools=2.80.3=h8fdd7da_2 +- glpk=5.0=h445213a_0 +- gmp=6.3.0=hac33072_2 +- graphite2=1.3.13=h59595ed_1003 - gsl=2.7=he838d99_0 -- gst-plugins-base=1.14.5=h0935bb2_2 -- gstreamer=1.14.5=h36ae1b5_2 -- icu=67.1=he1b5a44_0 -- idna=3.6=pyhd8ed1ab_0 -- imagecodecs=2022.8.8=py38hf09e3b1_5 +- gst-plugins-base=1.24.6=hbaaba92_0 +- gstreamer=1.24.6=haf2f30d_0 +- harfbuzz=9.0.0=hfac3d4d_0 +- icu=73.2=h59595ed_0 +- imagecodecs=2024.6.1=py311h732c098_3 - imageio=2.34.0=pyh4b66e23_0 -- importlib-metadata=7.0.1=pyha770c72_0 -- importlib_metadata=7.0.1=hd8ed1ab_0 -- importlib_resources=6.1.1=pyhd8ed1ab_0 +- importlib-metadata=8.4.0=pyha770c72_0 - ipython=8.12.2=pyh41d4057_0 - jedi=0.19.1=pyhd8ed1ab_0 -- jpeg=9e=h0b41bf4_3 - jxrlib=1.1=hd590300_3 - keyutils=1.6.1=h166bdaf_0 -- kiwisolver=1.4.5=py38h7f3f72f_1 -- krb5=1.20.1=hf9c8cef_0 -- lcms2=2.14=h6ed2654_0 -- ld_impl_linux-64=2.40=h41732ed_0 +- kiwisolver=1.4.7=py311hd18a35c_0 +- krb5=1.21.3=h659f571_0 +- lame=3.100=h166bdaf_1003 +- lazy-loader=0.4=pyhd8ed1ab_1 +- lazy_loader=0.4=pyhd8ed1ab_1 +- lcms2=2.16=hb7c19ff_0 +- ld_impl_linux-64=2.40=hf3520f5_7 - lerc=4.0.0=h27087fc_0 -- libaec=1.1.2=h59595ed_1 -- libavif=0.10.1=h5cdd6b5_2 +- libaec=1.1.3=h59595ed_0 +- libasprintf=0.22.5=he8f35ee_3 +- libasprintf-devel=0.22.5=he8f35ee_3 +- libavif16=1.1.1=h104a339_1 - libblas=3.9.0=1_h86c2bf4_netlib -- libbrotlicommon=1.0.9=h166bdaf_9 -- libbrotlidec=1.0.9=h166bdaf_9 -- libbrotlienc=1.0.9=h166bdaf_9 -- libcblas=3.9.0=5_h92ddd45_netlib -- libclang=10.0.1=default_hde54327_1 -- libcurl=7.87.0=h6312ad2_0 -- libdeflate=1.14=h166bdaf_0 +- libbrotlicommon=1.1.0=hb9d3cd8_2 +- libbrotlidec=1.1.0=hb9d3cd8_2 +- libbrotlienc=1.1.0=hb9d3cd8_2 +- libcap=2.69=h0f662aa_0 +- libcblas=3.9.0=6_ha36c22a_netlib +- libclang-cpp15=15.0.7=default_h127d8a8_5 +- libclang13=18.1.8=default_h9def88c_4 +- libcups=2.3.3=h4637d8d_4 +- libdeflate=1.21=h4bc722e_0 - libedit=3.1.20191231=he28a2e2_2 -- libev=4.33=hd590300_2 -- libevent=2.1.10=h9b69904_4 -- libexpat=2.5.0=hcb278e6_1 -- libffi=3.2.1=he1b5a44_1007 -- libgcc-ng=13.2.0=h807b86a_5 -- libgfortran-ng=13.2.0=h69a702a_5 -- libgfortran5=13.2.0=ha4646dd_5 -- libglib=2.66.3=hbe7bbb4_0 +- libevent=2.1.12=hf998b51_1 +- libexpat=2.6.2=h59595ed_0 +- libffi=3.4.2=h7f98852_5 +- libflac=1.4.3=h59595ed_0 +- libgcc=14.1.0=h77fa898_1 +- libgcc-ng=14.1.0=h69a702a_1 +- libgcrypt=1.11.0=h4ab18f5_1 +- libgettextpo=0.22.5=he02047a_3 +- libgettextpo-devel=0.22.5=he02047a_3 +- libgfortran=14.1.0=h69a702a_1 +- libgfortran-ng=14.1.0=h69a702a_1 +- libgfortran5=14.1.0=hc5f4f2c_1 +- libglib=2.80.3=h315aac3_2 +- libgpg-error=1.50=h4f305b6_0 +- libhwloc=2.11.1=default_hecaa2ac_1000 +- libhwy=1.1.0=h00ab1b0_0 - libiconv=1.17=hd590300_2 -- liblapack=3.9.0=5_h92ddd45_netlib -- libllvm10=10.0.1=he513fc3_3 -- libnghttp2=1.51.0=hdcd2b5c_0 -- libpng=1.6.42=h2797004_0 -- libpq=12.15=h37d81fd_1 -- libsqlite=3.45.1=h2797004_0 -- libssh2=1.10.0=haa6b8db_3 -- libstdcxx-ng=13.2.0=h7e041cc_5 -- libtiff=4.4.0=h82bc61c_5 +- libjpeg-turbo=3.0.0=hd590300_1 +- libjxl=0.10.3=h66b40c8_0 +- liblapack=3.9.0=6_ha36c22a_netlib +- libllvm15=15.0.7=hb3ce162_4 +- libllvm18=18.1.8=h8b73ec9_2 +- libnsl=2.0.1=hd590300_0 +- libogg=1.3.5=h4ab18f5_0 +- libopus=1.3.1=h7f98852_1 +- libosqp=0.6.3=h6a678d5_0 +- libpng=1.6.43=h2797004_0 +- libpq=16.4=h2d7952a_1 +- libqdldl=0.1.7=hcb278e6_0 +- libsndfile=1.2.2=hc60ed4a_1 +- libsqlite=3.46.1=hadc24fc_0 +- libstdcxx=14.1.0=hc0a3c3a_1 +- libstdcxx-ng=14.1.0=h4852527_1 +- libsystemd0=256.5=hb6d7363_0 +- libtiff=4.6.0=h46a8edc_4 - libuuid=2.38.1=h0b41bf4_0 -- libwebp-base=1.3.2=hd590300_0 -- libxcb=1.16=hd590300_0 -- libxkbcommon=0.10.0=he1b5a44_0 -- libxml2=2.9.10=h68273f3_2 -- libzlib=1.2.13=hd590300_5 +- libvorbis=1.3.7=h9c3ff4c_0 +- libwebp-base=1.4.0=hd590300_0 +- libxcb=1.16=hb9d3cd8_1 +- libxcrypt=4.4.36=hd590300_1 +- libxkbcommon=1.7.0=h2c5496b_1 +- libxml2=2.12.7=h4c95cb1_3 +- libzlib=1.3.1=h4ab18f5_1 - libzopfli=1.0.3=h9c3ff4c_0 -- llvm-openmp=17.0.6=h4dfa4b3_0 -- locket=1.0.0=pyhd8ed1ab_0 +- llvm-openmp=18.1.8=hf5423f3_1 - lz4-c=1.9.4=hcb278e6_0 -- matplotlib=3.7.1=py38h578d9bd_0 -- matplotlib-base=3.7.1=py38h417a72b_1 -- matplotlib-inline=0.1.6=pyhd8ed1ab_0 +- matplotlib=3.7.1=py311h38be061_0 +- matplotlib-base=3.7.1=py311h8597a09_0 +- matplotlib-inline=0.1.7=pyhd8ed1ab_0 - metis=5.1.0=h59595ed_1007 - mkl=2020.0=166 -- mpfr=4.2.1=h9458935_0 +- mpfr=4.2.1=h38ae2d0_2 +- mpg123=1.32.6=h59595ed_0 - munkres=1.1.4=pyh9f0ad1d_0 -- mysql-common=8.0.32=h14678bc_0 -- mysql-libs=8.0.32=h54cf53e_0 -- ncurses=6.4=h59595ed_2 -- networkx=3.1=pyhd8ed1ab_0 +- mysql-common=8.3.0=h70512c7_5 +- mysql-libs=8.3.0=ha479ceb_5 +- ncurses=6.5=he02047a_1 +- networkx=3.3=pyhd8ed1ab_1 - nspr=4.35=h27087fc_0 -- nss=3.97=h1d7d5a4_0 -- numpy=1.20.0=py38h18fd61f_0 -- openjpeg=2.5.0=h7d73246_1 -- openssl=1.1.1w=hd590300_0 -- osqp=0.6.2.post0=py38h43a58ef_3 -- packaging=23.2=pyhd8ed1ab_0 -- parso=0.8.3=pyhd8ed1ab_0 -- partd=1.4.1=pyhd8ed1ab_0 -- pcre=8.45=h9c3ff4c_0 +- nss=3.104=hd34e28f_0 +- numpy=1.26.4=py311h64a7726_0 +- openjpeg=2.5.2=h488ebb8_0 +- openssl=3.3.2=hb9d3cd8_0 +- osqp=0.6.7.post0=py311h14de704_0 +- packaging=24.1=pyhd8ed1ab_0 +- parso=0.8.4=pyhd8ed1ab_0 +- pcre2=10.44=hba22ea6_2 - pexpect=4.9.0=pyhd8ed1ab_0 - pickleshare=0.7.5=py_1003 -- pillow=10.2.0=py38h5eee18b_0 -- pip=24.0=pyhd8ed1ab_0 -- platformdirs=4.2.0=pyhd8ed1ab_0 -- pooch=1.8.0=pyhd8ed1ab_0 -- prompt-toolkit=3.0.42=pyha770c72_0 -- prompt_toolkit=3.0.42=hd8ed1ab_0 +- pillow=10.4.0=py311h82a398c_0 +- pip=24.2=pyh8b19718_1 +- pixman=0.43.2=h59595ed_0 +- ply=3.11=pyhd8ed1ab_2 +- prompt-toolkit=3.0.47=pyha770c72_0 +- prompt_toolkit=3.0.47=hd8ed1ab_0 - pthread-stubs=0.4=h36c2ea0_1001 - ptyprocess=0.7.0=pyhd3deb0d_0 -- pure_eval=0.2.2=pyhd8ed1ab_0 -- pygments=2.17.2=pyhd8ed1ab_0 -- pyparsing=3.1.1=pyhd8ed1ab_0 -- pyqt=5.12.3=py38h578d9bd_8 -- pyqt-impl=5.12.3=py38h0ffb2e6_8 -- pyqt5-sip=4.19.18=py38h709712a_8 -- pyqtchart=5.12=py38h7400c14_8 -- pyqtwebengine=5.12.1=py38h7400c14_8 -- pysocks=1.7.1=pyha2e5f31_6 -- python=3.8.5=h1103e12_9_cpython -- python-dateutil=2.8.2=pyhd8ed1ab_0 -- python_abi=3.8=4_cp38 -- pywavelets=1.3.0=py38h71d37f0_1 -- pyyaml=6.0.1=py38h01eb140_1 -- qdldl-python=0.1.5=py38h43a58ef_2 -- qt=5.12.9=h1f2b2cb_0 +- pulseaudio-client=17.0=hb77b528_0 +- pure_eval=0.2.3=pyhd8ed1ab_0 +- pygments=2.18.0=pyhd8ed1ab_0 +- pyparsing=3.1.4=pyhd8ed1ab_0 +- pyqt=5.15.9=py311hf0fb5b6_5 +- pyqt5-sip=12.12.2=py311hb755f60_5 +- python=3.11.9=hb806964_0_cpython +- python-dateutil=2.9.0=pyhd8ed1ab_0 +- python_abi=3.11=5_cp311 +- pywavelets=1.7.0=py311h07ce7c0_0 +- pyyaml=6.0.1=py311h459d7ec_1 +- qdldl-python=0.1.7.post4=py311h14de704_0 +- qt-main=5.15.8=h320f8da_24 +- rav1e=0.6.6=he8a937b_2 - readline=8.2=h8228510_1 -- requests=2.31.0=pyhd8ed1ab_0 -- scikit-image=0.18.1=py38h51da96c_0 -- scipy=1.6.3=py38h7b17777_0 -- scs=2.1.4=py38h6afa1d1_0 -- setuptools=69.0.3=pyhd8ed1ab_0 +- scikit-image=0.24.0=py311h044e617_2 +- scipy=1.13.1=py311h517d4fd_0 +- scs=3.2.7=default_py311he11e7d9_0 +- setuptools=73.0.1=pyhd8ed1ab_0 +- sip=6.7.12=py311hb755f60_0 - six=1.16.0=pyh6c4a22f_0 -- snappy=1.1.10=h9fff704_0 -- sqlite=3.45.1=h2c6b66d_0 +- snappy=1.2.1=ha2e4443_0 - stack_data=0.6.2=pyhd8ed1ab_0 -- suitesparse=5.10.1=h9e50725_1 -- tbb=2021.7.0=h924138e_0 -- tifffile=2022.10.10=pyhd8ed1ab_0 +- suitesparse=7.8.2=hb42a789_0 +- svt-av1=2.2.1=h5888daf_0 +- tbb=2021.12.0=h84d6215_4 +- tifffile=2024.8.30=pyhd8ed1ab_0 - tk=8.6.13=noxft_h4845f30_101 -- toolz=0.12.1=pyhd8ed1ab_0 -- tornado=6.3.3=py38h01eb140_1 -- traitlets=5.14.1=pyhd8ed1ab_0 -- typing_extensions=4.9.0=pyha770c72_0 -- unicodedata2=15.1.0=py38h01eb140_0 -- urllib3=2.2.0=pyhd8ed1ab_0 +- toml=0.10.2=pyhd8ed1ab_0 +- tomli=2.0.1=pyhd8ed1ab_0 +- tornado=6.4.1=py311h9ecbd09_1 +- traitlets=5.14.3=pyhd8ed1ab_0 +- typing_extensions=4.12.2=pyha770c72_0 +- tzdata=2024a=h8827d51_1 - wcwidth=0.2.13=pyhd8ed1ab_0 -- wheel=0.42.0=pyhd8ed1ab_0 +- wheel=0.44.0=pyhd8ed1ab_0 +- xcb-util=0.4.1=hb711507_2 +- xcb-util-image=0.4.0=hb711507_2 +- xcb-util-keysyms=0.4.1=hb711507_0 +- xcb-util-renderutil=0.3.10=hb711507_0 +- xcb-util-wm=0.4.2=hb711507_0 +- xkeyboard-config=2.42=h4ab18f5_0 +- xorg-kbproto=1.0.7=h7f98852_1002 +- xorg-libice=1.1.1=hd590300_0 +- xorg-libsm=1.2.4=h7391055_0 +- xorg-libx11=1.8.9=hb711507_1 - xorg-libxau=1.0.11=hd590300_0 - xorg-libxdmcp=1.1.3=h7f98852_0 +- xorg-libxext=1.3.4=h0b41bf4_2 +- xorg-libxrender=0.9.11=hd590300_0 +- xorg-libxxf86vm=1.1.5=h4bc722e_1 +- xorg-renderproto=0.11.1=h7f98852_1002 +- xorg-xextproto=7.3.0=h0b41bf4_1003 +- xorg-xf86vidmodeproto=2.3.1=h7f98852_1002 +- xorg-xproto=7.0.31=h7f98852_1007 - xz=5.2.6=h166bdaf_0 - yaml=0.2.5=h7f98852_2 -- zfp=1.0.1=h59595ed_0 -- zipp=3.17.0=pyhd8ed1ab_0 -- zlib=1.2.13=hd590300_5 -- zlib-ng=2.0.7=h0b41bf4_0 -- zstd=1.5.5=hfc55251_0 +- zfp=1.0.1=hac33072_1 +- zipp=3.20.1=pyhd8ed1ab_0 +- zlib=1.3.1=h4ab18f5_1 +- zlib-ng=2.2.1=he02047a_0 +- zstd=1.5.6=ha6fb4c9_0 - pip: - aiosignal==1.3.1 - - attrs==23.2.0 - - filelock==3.13.1 + - attrs==24.2.0 + - charset-normalizer==3.3.2 + - click==8.1.7 + - filelock==3.15.4 - frozenlist==1.4.1 - - jsonschema==4.21.1 + - idna==3.8 + - jsonschema==4.23.0 - jsonschema-specifications==2023.12.1 - - msgpack==1.0.7 - - pkgutil-resolve-name==1.3.10 - - protobuf==4.25.2 + - msgpack==1.0.8 + - protobuf==5.28.0 - ray==2.9.2 - - referencing==0.33.0 - - rpds-py==0.17.1 + - referencing==0.35.1 + - requests==2.32.3 + - rpds-py==0.20.0 + - urllib3==2.2.2 diff --git a/superdsm/automation.py b/superdsm/automation.py index 780ce7a..4c89e09 100644 --- a/superdsm/automation.py +++ b/superdsm/automation.py @@ -1,6 +1,7 @@ from .render import normalize_image import skimage +import skimage.feature.blob import math import scipy.ndimage as ndi import numpy as np diff --git a/superdsm/postprocess.py b/superdsm/postprocess.py index f9b42a1..5647852 100644 --- a/superdsm/postprocess.py +++ b/superdsm/postprocess.py @@ -339,7 +339,7 @@ def _process_mask(object, g, max_distance, stdamp, fill_holes=False): def _compute_eccentricity(object): if object.fg_fragment.any(): - return skimage.measure.regionprops(object.fg_fragment.astype('uint8'), coordinates='rc')[0].eccentricity + return skimage.measure.regionprops(object.fg_fragment.astype('uint8'))[0].eccentricity else: return 0