pcot 1.1.0rc1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. pcot-1.1.0rc1/LICENSE +20 -0
  2. pcot-1.1.0rc1/PKG-INFO +305 -0
  3. pcot-1.1.0rc1/README.md +268 -0
  4. pcot-1.1.0rc1/pyproject.toml +100 -0
  5. pcot-1.1.0rc1/src/pcot/VERSION.txt +2 -0
  6. pcot-1.1.0rc1/src/pcot/__init__.py +158 -0
  7. pcot-1.1.0rc1/src/pcot/__main__.py +6 -0
  8. pcot-1.1.0rc1/src/pcot/ancillary/__init__.py +20 -0
  9. pcot-1.1.0rc1/src/pcot/ancillary/aupe.py +97 -0
  10. pcot-1.1.0rc1/src/pcot/ancillary/bandancillary.py +62 -0
  11. pcot-1.1.0rc1/src/pcot/ancillary/keys.py +38 -0
  12. pcot-1.1.0rc1/src/pcot/ancillary/multifile.py +69 -0
  13. pcot-1.1.0rc1/src/pcot/app.py +120 -0
  14. pcot-1.1.0rc1/src/pcot/assets/__init__.py +42 -0
  15. pcot-1.1.0rc1/src/pcot/assets/data/builtin_spectral_parameters.yaml +116 -0
  16. pcot-1.1.0rc1/src/pcot/assets/data/colour_correction/ae_dl_ccm.csv +3 -0
  17. pcot-1.1.0rc1/src/pcot/assets/data/colour_correction/pc_nl_ccm.csv +3 -0
  18. pcot-1.1.0rc1/src/pcot/assets/data/colour_correction/pc_nl_spl_o.npz +0 -0
  19. pcot-1.1.0rc1/src/pcot/assets/data/colour_correction/pc_th_ccm.csv +3 -0
  20. pcot-1.1.0rc1/src/pcot/assets/data/colour_correction/pc_th_spl_o.npz +0 -0
  21. pcot-1.1.0rc1/src/pcot/assets/icons/arrow-down-darkmode.svg +1 -0
  22. pcot-1.1.0rc1/src/pcot/assets/icons/arrow-down.svg +1 -0
  23. pcot-1.1.0rc1/src/pcot/assets/icons/arrow-up-darkmode.svg +1 -0
  24. pcot-1.1.0rc1/src/pcot/assets/icons/arrow-up.svg +1 -0
  25. pcot-1.1.0rc1/src/pcot/assets/icons/chevrons-down-darkmode.svg +1 -0
  26. pcot-1.1.0rc1/src/pcot/assets/icons/chevrons-down.svg +1 -0
  27. pcot-1.1.0rc1/src/pcot/assets/icons/chevrons-up-darkmode.svg +1 -0
  28. pcot-1.1.0rc1/src/pcot/assets/icons/chevrons-up.svg +1 -0
  29. pcot-1.1.0rc1/src/pcot/assets/icons/info-darkmode.svg +1 -0
  30. pcot-1.1.0rc1/src/pcot/assets/icons/info.svg +1 -0
  31. pcot-1.1.0rc1/src/pcot/assets/icons/lock-darkmode.svg +1 -0
  32. pcot-1.1.0rc1/src/pcot/assets/icons/lock.svg +1 -0
  33. pcot-1.1.0rc1/src/pcot/assets/icons/maximize-2-darkmode.svg +1 -0
  34. pcot-1.1.0rc1/src/pcot/assets/icons/maximize-2.svg +1 -0
  35. pcot-1.1.0rc1/src/pcot/assets/icons/unlock-darkmode.svg +1 -0
  36. pcot-1.1.0rc1/src/pcot/assets/icons/unlock.svg +1 -0
  37. pcot-1.1.0rc1/src/pcot/assets/icons/x-circle-darkmode.svg +1 -0
  38. pcot-1.1.0rc1/src/pcot/assets/icons/x-circle.svg +1 -0
  39. pcot-1.1.0rc1/src/pcot/assets/images/blackAndCols.png +0 -0
  40. pcot-1.1.0rc1/src/pcot/assets/images/corrib.png +0 -0
  41. pcot-1.1.0rc1/src/pcot/assets/images/gradRGB.png +0 -0
  42. pcot-1.1.0rc1/src/pcot/assets/images/marsRGB.png +0 -0
  43. pcot-1.1.0rc1/src/pcot/assets/images/simpct.png +0 -0
  44. pcot-1.1.0rc1/src/pcot/assets/images/tstreg1.png +0 -0
  45. pcot-1.1.0rc1/src/pcot/assets/images/tstreg2.png +0 -0
  46. pcot-1.1.0rc1/src/pcot/assets/ui/dialogs/about.css +12 -0
  47. pcot-1.1.0rc1/src/pcot/assets/ui/dialogs/about.md +39 -0
  48. pcot-1.1.0rc1/src/pcot/assets/ui/dialogs/about.ui +71 -0
  49. pcot-1.1.0rc1/src/pcot/assets/ui/dialogs/import.ui +104 -0
  50. pcot-1.1.0rc1/src/pcot/assets/ui/dialogs/main.ui +512 -0
  51. pcot-1.1.0rc1/src/pcot/assets/ui/dialogs/presets.ui +82 -0
  52. pcot-1.1.0rc1/src/pcot/assets/ui/dialogs/rawloader.ui +207 -0
  53. pcot-1.1.0rc1/src/pcot/assets/ui/dialogs/reorderplots.ui +129 -0
  54. pcot-1.1.0rc1/src/pcot/assets/ui/dialogs/showcamsrefls.ui +331 -0
  55. pcot-1.1.0rc1/src/pcot/assets/ui/inputs/inputenvi.ui +74 -0
  56. pcot-1.1.0rc1/src/pcot/assets/ui/inputs/inputmultifile.ui +204 -0
  57. pcot-1.1.0rc1/src/pcot/assets/ui/inputs/inputparc.ui +138 -0
  58. pcot-1.1.0rc1/src/pcot/assets/ui/inputs/inputpdsfile.ui +225 -0
  59. pcot-1.1.0rc1/src/pcot/assets/ui/inputs/inputrgb.ui +160 -0
  60. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabPCA.ui +200 -0
  61. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabassignfilters.ui +102 -0
  62. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabbanddepth.ui +83 -0
  63. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabcirc.ui +210 -0
  64. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabcolmap.ui +365 -0
  65. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabcomment.ui +106 -0
  66. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabconnector.ui +62 -0
  67. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabcontrast.ui +68 -0
  68. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabcrosscalib.ui +178 -0
  69. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabcurve.ui +134 -0
  70. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabdecorr.ui +149 -0
  71. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabdqmod.ui +198 -0
  72. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabexpr.ui +91 -0
  73. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabgen.ui +173 -0
  74. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabhistogram.ui +62 -0
  75. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabimportroi.ui +106 -0
  76. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabinset.ui +116 -0
  77. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabmacro.ui +74 -0
  78. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabmacroparam.ui +66 -0
  79. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabmanreg.ui +239 -0
  80. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabmultidot.ui +281 -0
  81. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabnorm.ui +74 -0
  82. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/taboffset.ui +100 -0
  83. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabpainted.ui +190 -0
  84. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabpctcalib.ui +288 -0
  85. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabpctdetection.ui +305 -0
  86. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabpixtest.ui +238 -0
  87. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabpoly.ui +186 -0
  88. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabrect.ui +220 -0
  89. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabreflectance.ui +294 -0
  90. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabroicull.ui +71 -0
  91. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabroidq.ui +202 -0
  92. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabroiexpr.ui +242 -0
  93. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabscalartest.ui +161 -0
  94. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabspecparam.ui +93 -0
  95. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabspectrum.ui +422 -0
  96. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabstitch.ui +104 -0
  97. pcot-1.1.0rc1/src/pcot/assets/ui/tabs/tabstringtest.ui +70 -0
  98. pcot-1.1.0rc1/src/pcot/batch.py +39 -0
  99. pcot-1.1.0rc1/src/pcot/calib/__init__.py +2 -0
  100. pcot-1.1.0rc1/src/pcot/calib/apply.py +106 -0
  101. pcot-1.1.0rc1/src/pcot/calib/colorchecker_classic.py +80 -0
  102. pcot-1.1.0rc1/src/pcot/calib/fit.py +296 -0
  103. pcot-1.1.0rc1/src/pcot/calib/pct.py +40 -0
  104. pcot-1.1.0rc1/src/pcot/calib/target.py +47 -0
  105. pcot-1.1.0rc1/src/pcot/cameras/__init__.py +89 -0
  106. pcot-1.1.0rc1/src/pcot/cameras/camdata.py +254 -0
  107. pcot-1.1.0rc1/src/pcot/cameras/filters.py +221 -0
  108. pcot-1.1.0rc1/src/pcot/cameras/filtresponse.py +188 -0
  109. pcot-1.1.0rc1/src/pcot/cameras/reflectances.py +519 -0
  110. pcot-1.1.0rc1/src/pcot/cameras/show.py +247 -0
  111. pcot-1.1.0rc1/src/pcot/canvasnormalise.py +93 -0
  112. pcot-1.1.0rc1/src/pcot/colour_correction/__init__.py +2 -0
  113. pcot-1.1.0rc1/src/pcot/colour_correction/colour_transforms.py +121 -0
  114. pcot-1.1.0rc1/src/pcot/colour_correction/constants.py +30 -0
  115. pcot-1.1.0rc1/src/pcot/colour_correction/correct.py +74 -0
  116. pcot-1.1.0rc1/src/pcot/config.py +365 -0
  117. pcot-1.1.0rc1/src/pcot/connbrushes.py +67 -0
  118. pcot-1.1.0rc1/src/pcot/dataformats/__init__.py +5 -0
  119. pcot-1.1.0rc1/src/pcot/dataformats/envi.py +353 -0
  120. pcot-1.1.0rc1/src/pcot/dataformats/load.py +463 -0
  121. pcot-1.1.0rc1/src/pcot/dataformats/pds4.py +343 -0
  122. pcot-1.1.0rc1/src/pcot/dataformats/raw.py +185 -0
  123. pcot-1.1.0rc1/src/pcot/datum.py +554 -0
  124. pcot-1.1.0rc1/src/pcot/datumexceptions.py +58 -0
  125. pcot-1.1.0rc1/src/pcot/datumfuncs.py +1441 -0
  126. pcot-1.1.0rc1/src/pcot/datumtypes.py +446 -0
  127. pcot-1.1.0rc1/src/pcot/document.py +419 -0
  128. pcot-1.1.0rc1/src/pcot/documentsettings.py +30 -0
  129. pcot-1.1.0rc1/src/pcot/dq.py +102 -0
  130. pcot-1.1.0rc1/src/pcot/expressions/__init__.py +4 -0
  131. pcot-1.1.0rc1/src/pcot/expressions/eval.py +152 -0
  132. pcot-1.1.0rc1/src/pcot/expressions/instructions.py +211 -0
  133. pcot-1.1.0rc1/src/pcot/expressions/ops.py +343 -0
  134. pcot-1.1.0rc1/src/pcot/expressions/parse.py +255 -0
  135. pcot-1.1.0rc1/src/pcot/expressions/prattparser.py +444 -0
  136. pcot-1.1.0rc1/src/pcot/expressions/register.py +266 -0
  137. pcot-1.1.0rc1/src/pcot/expressions/types.py +205 -0
  138. pcot-1.1.0rc1/src/pcot/imagecube.py +1287 -0
  139. pcot-1.1.0rc1/src/pcot/imageexport.py +163 -0
  140. pcot-1.1.0rc1/src/pcot/inputs/__init__.py +11 -0
  141. pcot-1.1.0rc1/src/pcot/inputs/directinput.py +54 -0
  142. pcot-1.1.0rc1/src/pcot/inputs/envimethod.py +119 -0
  143. pcot-1.1.0rc1/src/pcot/inputs/inp.py +311 -0
  144. pcot-1.1.0rc1/src/pcot/inputs/inputmethod.py +236 -0
  145. pcot-1.1.0rc1/src/pcot/inputs/multifile.py +575 -0
  146. pcot-1.1.0rc1/src/pcot/inputs/nullinput.py +27 -0
  147. pcot-1.1.0rc1/src/pcot/inputs/parc.py +299 -0
  148. pcot-1.1.0rc1/src/pcot/inputs/pds4input.py +524 -0
  149. pcot-1.1.0rc1/src/pcot/inputs/rgb.py +172 -0
  150. pcot-1.1.0rc1/src/pcot/macros.py +668 -0
  151. pcot-1.1.0rc1/src/pcot/main.py +26 -0
  152. pcot-1.1.0rc1/src/pcot/operations/__init__.py +64 -0
  153. pcot-1.1.0rc1/src/pcot/operations/curve.py +55 -0
  154. pcot-1.1.0rc1/src/pcot/operations/norm.py +94 -0
  155. pcot-1.1.0rc1/src/pcot/palette.py +303 -0
  156. pcot-1.1.0rc1/src/pcot/parameters/__init__.py +10 -0
  157. pcot-1.1.0rc1/src/pcot/parameters/autodoc.py +227 -0
  158. pcot-1.1.0rc1/src/pcot/parameters/inputs.py +153 -0
  159. pcot-1.1.0rc1/src/pcot/parameters/parameterfile.py +588 -0
  160. pcot-1.1.0rc1/src/pcot/parameters/runner.py +319 -0
  161. pcot-1.1.0rc1/src/pcot/parameters/taggedaggregates.py +943 -0
  162. pcot-1.1.0rc1/src/pcot/rois.py +1123 -0
  163. pcot-1.1.0rc1/src/pcot/sources.py +591 -0
  164. pcot-1.1.0rc1/src/pcot/subcommands/__init__.py +17 -0
  165. pcot-1.1.0rc1/src/pcot/subcommands/batch.py +28 -0
  166. pcot-1.1.0rc1/src/pcot/subcommands/config.py +117 -0
  167. pcot-1.1.0rc1/src/pcot/subcommands/gencam.py +364 -0
  168. pcot-1.1.0rc1/src/pcot/subcommands/genrefl.py +111 -0
  169. pcot-1.1.0rc1/src/pcot/subcommands/lscams.py +107 -0
  170. pcot-1.1.0rc1/src/pcot/subcommands/lsrefls.py +74 -0
  171. pcot-1.1.0rc1/src/pcot/subcommands/parcutils.py +76 -0
  172. pcot-1.1.0rc1/src/pcot/subcommands/subcommands.py +77 -0
  173. pcot-1.1.0rc1/src/pcot/ui/__init__.py +168 -0
  174. pcot-1.1.0rc1/src/pcot/ui/canvas.py +1981 -0
  175. pcot-1.1.0rc1/src/pcot/ui/canvasdq.py +94 -0
  176. pcot-1.1.0rc1/src/pcot/ui/collapser.py +227 -0
  177. pcot-1.1.0rc1/src/pcot/ui/datadialog.py +13 -0
  178. pcot-1.1.0rc1/src/pcot/ui/datawidget.py +221 -0
  179. pcot-1.1.0rc1/src/pcot/ui/dqwidget.py +93 -0
  180. pcot-1.1.0rc1/src/pcot/ui/filepathedit.py +82 -0
  181. pcot-1.1.0rc1/src/pcot/ui/gradient.py +194 -0
  182. pcot-1.1.0rc1/src/pcot/ui/graphscene.py +945 -0
  183. pcot-1.1.0rc1/src/pcot/ui/graphview.py +156 -0
  184. pcot-1.1.0rc1/src/pcot/ui/help.py +170 -0
  185. pcot-1.1.0rc1/src/pcot/ui/importdialog.py +61 -0
  186. pcot-1.1.0rc1/src/pcot/ui/inputs.py +388 -0
  187. pcot-1.1.0rc1/src/pcot/ui/linear.py +386 -0
  188. pcot-1.1.0rc1/src/pcot/ui/mainwindow.py +805 -0
  189. pcot-1.1.0rc1/src/pcot/ui/mplwidget.py +94 -0
  190. pcot-1.1.0rc1/src/pcot/ui/namedialog.py +42 -0
  191. pcot-1.1.0rc1/src/pcot/ui/number.py +94 -0
  192. pcot-1.1.0rc1/src/pcot/ui/presetmgr.py +304 -0
  193. pcot-1.1.0rc1/src/pcot/ui/roiedit.py +283 -0
  194. pcot-1.1.0rc1/src/pcot/ui/smallwidgets.py +14 -0
  195. pcot-1.1.0rc1/src/pcot/ui/spectrumwidget.py +121 -0
  196. pcot-1.1.0rc1/src/pcot/ui/tabledialog.py +53 -0
  197. pcot-1.1.0rc1/src/pcot/ui/tablemodel.py +386 -0
  198. pcot-1.1.0rc1/src/pcot/ui/tabs.py +359 -0
  199. pcot-1.1.0rc1/src/pcot/ui/tabulardatawidget.py +110 -0
  200. pcot-1.1.0rc1/src/pcot/ui/taggedaggregates/__init__.py +199 -0
  201. pcot-1.1.0rc1/src/pcot/ui/taggedaggregates/configui.py +122 -0
  202. pcot-1.1.0rc1/src/pcot/ui/taggedaggregates/editors.py +480 -0
  203. pcot-1.1.0rc1/src/pcot/ui/textedit.py +104 -0
  204. pcot-1.1.0rc1/src/pcot/ui/texttogglebutton.py +79 -0
  205. pcot-1.1.0rc1/src/pcot/ui/theme.py +129 -0
  206. pcot-1.1.0rc1/src/pcot/ui/uiloader.py +245 -0
  207. pcot-1.1.0rc1/src/pcot/ui/variantwidget.py +99 -0
  208. pcot-1.1.0rc1/src/pcot/ui/zoomevents.py +29 -0
  209. pcot-1.1.0rc1/src/pcot/utils/__init__.py +111 -0
  210. pcot-1.1.0rc1/src/pcot/utils/annotations.py +129 -0
  211. pcot-1.1.0rc1/src/pcot/utils/archive.py +571 -0
  212. pcot-1.1.0rc1/src/pcot/utils/cluster.py +94 -0
  213. pcot-1.1.0rc1/src/pcot/utils/colour.py +32 -0
  214. pcot-1.1.0rc1/src/pcot/utils/datumstore.py +308 -0
  215. pcot-1.1.0rc1/src/pcot/utils/deb.py +104 -0
  216. pcot-1.1.0rc1/src/pcot/utils/debayering.py +84 -0
  217. pcot-1.1.0rc1/src/pcot/utils/decorr.py +102 -0
  218. pcot-1.1.0rc1/src/pcot/utils/demosaicing/__init__.py +42 -0
  219. pcot-1.1.0rc1/src/pcot/utils/demosaicing/malvar.py +184 -0
  220. pcot-1.1.0rc1/src/pcot/utils/demosaicing/menon.py +378 -0
  221. pcot-1.1.0rc1/src/pcot/utils/demosaicing/utils.py +85 -0
  222. pcot-1.1.0rc1/src/pcot/utils/flood.py +127 -0
  223. pcot-1.1.0rc1/src/pcot/utils/geom.py +76 -0
  224. pcot-1.1.0rc1/src/pcot/utils/gradient.py +89 -0
  225. pcot-1.1.0rc1/src/pcot/utils/html.py +57 -0
  226. pcot-1.1.0rc1/src/pcot/utils/image.py +56 -0
  227. pcot-1.1.0rc1/src/pcot/utils/interp.py +127 -0
  228. pcot-1.1.0rc1/src/pcot/utils/maths.py +34 -0
  229. pcot-1.1.0rc1/src/pcot/utils/params.py +3 -0
  230. pcot-1.1.0rc1/src/pcot/utils/spectralparameters.py +178 -0
  231. pcot-1.1.0rc1/src/pcot/utils/spectrum.py +244 -0
  232. pcot-1.1.0rc1/src/pcot/utils/spectrumdata.py +455 -0
  233. pcot-1.1.0rc1/src/pcot/utils/table.py +225 -0
  234. pcot-1.1.0rc1/src/pcot/utils/tabular_provider.py +74 -0
  235. pcot-1.1.0rc1/src/pcot/utils/text.py +74 -0
  236. pcot-1.1.0rc1/src/pcot/value.py +456 -0
  237. pcot-1.1.0rc1/src/pcot/xform.py +1669 -0
  238. pcot-1.1.0rc1/src/pcot/xforms/__init__.py +23 -0
  239. pcot-1.1.0rc1/src/pcot/xforms/favourite.py +36 -0
  240. pcot-1.1.0rc1/src/pcot/xforms/tabgeneric.py +89 -0
  241. pcot-1.1.0rc1/src/pcot/xforms/xformassignfilters.py +219 -0
  242. pcot-1.1.0rc1/src/pcot/xforms/xformautoregister.py +78 -0
  243. pcot-1.1.0rc1/src/pcot/xforms/xformbanddepth.py +137 -0
  244. pcot-1.1.0rc1/src/pcot/xforms/xformcalibtargets.py +625 -0
  245. pcot-1.1.0rc1/src/pcot/xforms/xformcirc.py +189 -0
  246. pcot-1.1.0rc1/src/pcot/xforms/xformcolourcorrection.py +66 -0
  247. pcot-1.1.0rc1/src/pcot/xforms/xformcolourmap.py +622 -0
  248. pcot-1.1.0rc1/src/pcot/xforms/xformcomment.py +164 -0
  249. pcot-1.1.0rc1/src/pcot/xforms/xformconstant.py +109 -0
  250. pcot-1.1.0rc1/src/pcot/xforms/xformcontrast.py +175 -0
  251. pcot-1.1.0rc1/src/pcot/xforms/xformcrop.py +36 -0
  252. pcot-1.1.0rc1/src/pcot/xforms/xformcrosscalib.py +355 -0
  253. pcot-1.1.0rc1/src/pcot/xforms/xformcurve.py +83 -0
  254. pcot-1.1.0rc1/src/pcot/xforms/xformcustomtabexample.py +251 -0
  255. pcot-1.1.0rc1/src/pcot/xforms/xformdecorr.py +129 -0
  256. pcot-1.1.0rc1/src/pcot/xforms/xformdqmod.py +219 -0
  257. pcot-1.1.0rc1/src/pcot/xforms/xformdummy.py +25 -0
  258. pcot-1.1.0rc1/src/pcot/xforms/xformexpr.py +342 -0
  259. pcot-1.1.0rc1/src/pcot/xforms/xformgen.py +265 -0
  260. pcot-1.1.0rc1/src/pcot/xforms/xformhist.py +129 -0
  261. pcot-1.1.0rc1/src/pcot/xforms/xformhistequal.py +102 -0
  262. pcot-1.1.0rc1/src/pcot/xforms/xformimportroi.py +110 -0
  263. pcot-1.1.0rc1/src/pcot/xforms/xforminput.py +70 -0
  264. pcot-1.1.0rc1/src/pcot/xforms/xforminset.py +232 -0
  265. pcot-1.1.0rc1/src/pcot/xforms/xformmanualregister.py +506 -0
  266. pcot-1.1.0rc1/src/pcot/xforms/xformmultidot.py +686 -0
  267. pcot-1.1.0rc1/src/pcot/xforms/xformnorm.py +55 -0
  268. pcot-1.1.0rc1/src/pcot/xforms/xformoffset.py +82 -0
  269. pcot-1.1.0rc1/src/pcot/xforms/xformpainted.py +199 -0
  270. pcot-1.1.0rc1/src/pcot/xforms/xformpca.py +400 -0
  271. pcot-1.1.0rc1/src/pcot/xforms/xformpctpatchdetection.py +1277 -0
  272. pcot-1.1.0rc1/src/pcot/xforms/xformpoly.py +173 -0
  273. pcot-1.1.0rc1/src/pcot/xforms/xformrect.py +220 -0
  274. pcot-1.1.0rc1/src/pcot/xforms/xformreflectance.py +699 -0
  275. pcot-1.1.0rc1/src/pcot/xforms/xformroicull.py +90 -0
  276. pcot-1.1.0rc1/src/pcot/xforms/xformroidq.py +263 -0
  277. pcot-1.1.0rc1/src/pcot/xforms/xformroiexpr.py +504 -0
  278. pcot-1.1.0rc1/src/pcot/xforms/xformsimpleexample.py +135 -0
  279. pcot-1.1.0rc1/src/pcot/xforms/xformsink.py +61 -0
  280. pcot-1.1.0rc1/src/pcot/xforms/xformspecparam.py +111 -0
  281. pcot-1.1.0rc1/src/pcot/xforms/xformspectrum.py +491 -0
  282. pcot-1.1.0rc1/src/pcot/xforms/xformstitch.py +321 -0
  283. pcot-1.1.0rc1/src/pcot/xforms/xformstriproi.py +46 -0
  284. pcot-1.1.0rc1/src/pcot/xforms/xformtests.py +718 -0
pcot-1.1.0rc1/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2021 Aberystwyth University
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
pcot-1.1.0rc1/PKG-INFO ADDED
@@ -0,0 +1,305 @@
1
+ Metadata-Version: 2.1
2
+ Name: pcot
3
+ Version: 1.1.0rc1
4
+ Summary: PanCam Operations Toolkit
5
+ Home-page: https://github.com/AU-ExoMars/PCOT
6
+ License: MIT
7
+ Keywords: calibration,processing,image,research
8
+ Author: Jim Finnis
9
+ Author-email: jcf12@aber.ac.uk
10
+ Requires-Python: >=3.11,<3.13
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Scientific/Engineering
19
+ Requires-Dist: Jinja2 (>=3.1,<4.0)
20
+ Requires-Dist: PySide6 (>=6.9.3,<7)
21
+ Requires-Dist: PyYAML (>=6.0,<7.0)
22
+ Requires-Dist: click (>=8.1,<9.0)
23
+ Requires-Dist: markdown (>=3.3.6,<4.0.0)
24
+ Requires-Dist: matplotlib (>=3.9,<4.0)
25
+ Requires-Dist: numpy (>=1.26,<3)
26
+ Requires-Dist: opencv-python-headless (>=4.10.0.84,<5)
27
+ Requires-Dist: pds4-tools (>=1.2,<2.0)
28
+ Requires-Dist: proctools (>=0.3.1,<0.4.0)
29
+ Requires-Dist: python-dateutil (>=2.8,<3.0)
30
+ Requires-Dist: scikit-image (>=0.24,<0.27)
31
+ Requires-Dist: scipy (>=1.13,<2.0)
32
+ Project-URL: Bug Tracker, https://github.com/AU-ExoMars/PCOT/issues
33
+ Project-URL: Documentation, https://au-exomars.github.io/PCOT/
34
+ Project-URL: Repository, https://github.com/AU-ExoMars/PCOT
35
+ Description-Content-Type: text/markdown
36
+
37
+ # PCOT
38
+
39
+ <img src="https://raw.githubusercontent.com/AU-ExoMars/PCOT/72e6f0a5920d82fcf7c3beb8faf26cc43ca96b2f/docs/pcotlogo.png" alt="PCOT logo" width="100"/>
40
+
41
+ **More documentation can be found [here](https://au-exomars.github.io/PCOT/)**
42
+
43
+ PCOT is a Python application and library primarily intended for
44
+ processing data from the Pancam
45
+ instrument on the Rosalind Franklin rover, although it lends itself
46
+ to any task involving processing multispectral image data.
47
+
48
+ For example, with PCOT you can:
49
+ * load ENVI (BSQ interleaved 4-byte float) and (to a basic level) PDS4 multispectral images
50
+ * load multiple images in other formats (e.g. PNG) and combine them into
51
+ multispectral images
52
+ * define regions of interest in the data
53
+ * perform mathematical operations
54
+ * view spectra and histograms
55
+
56
+ and many other things besides. PCOT is highly extensible and open-source,
57
+ so any missing functionality is easily added.
58
+
59
+ PCOT operates on a graph model - the data is processed through a set of nodes
60
+ which manipulate it in various ways (e.g. add regions of interest, perform
61
+ maths, splice images together, merge image channels, plot spectra). A PCOT
62
+ document describes this graph, and we
63
+ intend that documents are distributed along with the data they generate
64
+ to help reproducibility.
65
+
66
+ ## Installation
67
+
68
+ ### Installing with pip
69
+
70
+ PCOT can be installed from [PyPI](https://pypi.org/project/pcot/) into any Python 3.11 or
71
+ 3.12 environment (a fresh virtual environment or Conda environment is best):
72
+
73
+ ```shell
74
+ pip install pcot
75
+ ```
76
+
77
+ You can then run **pcot** to start the application, or `import pcot` to use it as a library.
78
+ To get updates, run **pip install --upgrade pcot**.
79
+
80
+ A pip install doesn't include the camera data files, which describe each camera's filters, or
81
+ the reflectance target data used for calibration. Download them from
82
+ [pcot.aber.ac.uk](https://pcot.aber.ac.uk) and put them somewhere convenient. The first time
83
+ PCOT starts it will say it has no camera data and offer to let you choose a directory: choose
84
+ the one holding the camera files. It will offer the same for the reflectance target data.
85
+
86
+ If you want to change PCOT itself, or follow the latest development version, install it from
87
+ the repository as described below instead.
88
+
89
+ ### Installing from the repository
90
+
91
+ PCOT is a Python program (and library) with a number of dependencies,
92
+ notably numpy and PySide6 (the official Python interface to Qt).
93
+ We find the best way to manage these is to use
94
+ [Anaconda](https://anaconda.com/)
95
+ and
96
+ [Poetry](https://python-poetry.org/).
97
+ Installation has been tested on Windows 10,
98
+ MacOS and Ubuntu 20.04.
99
+
100
+ ### Install Anaconda
101
+ The first thing you will need to do is install Anaconda, which can be done from here:
102
+
103
+ * Windows: https://docs.anaconda.com/anaconda/install/windows/
104
+ * Linux: https://docs.anaconda.com/anaconda/install/linux/
105
+ * MacOS: https://docs.anaconda.com/anaconda/install/mac-os/ (untested)
106
+
107
+ ### Obtain the software
108
+
109
+ This can be done by
110
+ either downloading the archive from Github and extracting it into a new
111
+ directory,
112
+ or cloning the repository. In both cases, the top level directory should be
113
+ called
114
+ PCOT (this isn't really mandatory but makes the instructions below simpler).
115
+ The best way to download is this:
116
+
117
+ * Open an Anaconda shell window (see below)
118
+ * If you have an SSH key set up for GitHub, type this command into the shell
119
+ (**changing the repository address if it is different**):
120
+ ```shell
121
+ git clone git@github.com:AU-ExoMars/PCOT.git
122
+ ```
123
+ * Otherwise type this:
124
+ ```shell
125
+ git clone https://github.com/AU-ExoMars/PCOT.git
126
+ ```
127
+ * You should now have a PCOT directory which will contain this file (as README.md)
128
+ and quite a few others.
129
+
130
+ #### Opening Anaconda's shell on different OSs
131
+ * **Windows:** Open the **Anaconda Powershell Prompt** application, which will have been installed when you
132
+ installed Anaconda. This can be found in the Start menu under Anaconda3,
133
+ or in the applications list in Anaconda Navigator (which is also in the Start
134
+ menu in the same place).
135
+ * **Linux and MacOS**: just open a Bash shell
136
+
137
+ ### Installing on Ubuntu / MacOS
138
+ Assuming you have successfully installed Anaconda and cloned or downloaded
139
+ PCOT as above:
140
+
141
+ * Open a bash shell
142
+ * **cd** to the PCOT directory (which contains this file).
143
+ * Run the command **conda create -n pcot python=3.11 poetry**.
144
+ This will create an environment called **pcot** which uses Python 3.11 and
145
+ the Poetry dependency and packaging manager. It may take some time.
146
+ * Activate the environment with **conda activate pcot**.
147
+ * Now run **poetry install**. This will set up all the packages PCOT is
148
+ dependent on and install PCOT. See [below](#problems-with-pre-existing-python-packages) if you see errors here.
149
+ * You should now be able to run **pcot** to start the application.
150
+
151
+ PCOT now uses PySide6, which ships native wheels for Apple Silicon, so the Rosetta/osx-64
152
+ workaround formerly needed here for PySide2/shiboken2 on modern Macs is no longer required.
153
+
154
+ ### Installing on Windows
155
+ Assuming you have successfully installed Anaconda and cloned or downloaded PCOT as above:
156
+
157
+ * Open the Anaconda PowerShell Prompt application from the Start Menu.
158
+ * **cd** to the PCOT directory (which contains this file).
159
+ * Run the command **conda create -n pcot python=3.11 poetry**.
160
+ This will create an environment called **pcot** which uses Python 3.11 and the Poetry dependency
161
+ and packaging manager. It may take some time.
162
+ * Activate the environment with **conda activate pcot**.
163
+ * Now run **poetry install**. This will set up all the packages PCOT is dependent on and install
164
+ PCOT. See [below](#problems-with-pre-existing-python-packages) if you see errors here.
165
+ * You should now be able to run **pcot** to start the application.
166
+
167
+ ### Problems with pre-existing Python packages
168
+ You may have pre-existing packages in your system level Python installation which conflict
169
+ with those in Anaconda. Typically, this manifests as lots of errors when you run
170
+ `poetry install`. To fix this, tell Anaconda not to look at your system install at all:
171
+ ```
172
+ conda env config vars set PYTHONNOUSERSITE=1 -n pcot
173
+ conda deactivate
174
+ conda activate pcot
175
+ ```
176
+
177
+ ## Updating PCOT
178
+
179
+ You can usually upgrade PCOT just by running **git pull** in your PCOT
180
+ directory, assuming you cloned it. If you downloaded it, you'll need to download
181
+ the PCOT directory again.
182
+
183
+ It's generally best to do **poetry install** once in a while to make sure
184
+ all the packages are correct, particularly if you notice **poetry.lock**
185
+ has changed.
186
+
187
+ Finally, **if the Python version has changed** you will need to rebuild the
188
+ Conda environment from scratch. The following instructions assume you
189
+ are using a shell of some sort:
190
+ * **conda deactivate pcot** will make sure you are not actively using the
191
+ environment
192
+ * **conda env remove -n pcot** will delete the old environment
193
+ * **conda create -n pcot python=3.11 poetry** will create a new environment -
194
+ replace "3.11" with the correct new version
195
+ * **poetry install** will reinstall all the packages.
196
+
197
+ If you are using Pycharm you will probably need to refer to the instructions below on **Running PCOT inside Pycharm**
198
+ to update the interpreter to the new version.
199
+
200
+
201
+ ## Running PCOT
202
+ Open an Anaconda shell and run the following commands (assuming you installed PCOT into your home directory):
203
+ ```shell
204
+ cd PCOT
205
+ conda activate pcot
206
+ pcot
207
+ ```
208
+
209
+ ### Create an 'executable' icon (MacOS)
210
+ Note: these instructions were created and tested under MacOS but should be usable on other systems
211
+ with some adaptation.
212
+
213
+ The above commands can be put into a bash script which will allow PCOT to be run by clicking on an icon.
214
+
215
+ Open a text editor (e.g. TextEdit, Notepad++, Sublime, etc) and create a new file called **pcot.sh**, and save it
216
+ to your desktop (or wherever you want the icon). Add the following to this file:
217
+ ```shell
218
+ #!/usr/bin/env bash
219
+ eval "$(conda shell.bash hook)"
220
+ conda activate pcot
221
+ pcot
222
+ ```
223
+ Open a terminal window and navigate to the location of your new script, then run the following command to give it
224
+ permission to run:
225
+ ```shell
226
+ chmod +x pcot
227
+ ```
228
+
229
+ You can now use the icon to run PCOT.
230
+
231
+ Note: you may need to set up your system to open ```.sh``` files with Terminal by default.
232
+
233
+ ## Running PCOT inside Pycharm
234
+ These instructions may be useful if you want to run PCOT inside a debugger - for example, if you
235
+ are testing a custom node.
236
+ * First set up the Conda environment and interpreter:
237
+ * Open PyCharm and open the PCOT directory as an existing project.
238
+ * Open **File/Settings..** (Ctrl+Alt+S)
239
+ * Select **Project:PCOT / Python Interpreter**
240
+ * If the Python Interpreter is not already Python with something like **anaconda3/envs/pcot/bin/python**
241
+ * Select the cogwheel to the right of the Python Interpreter dropdown and then select **Add**.
242
+ * Select **Conda Environment**.
243
+ * Select **Existing Environment**.
244
+ * Select the environment: it should be something like **anaconda3/envs/pcot/bin/python**.
245
+ * Select **OK**.
246
+ * Now set up the run configuration:
247
+ * Select **Edit Configurations...** (or it might be **Add Configuration...**) from the configurations drop down in the menu bar
248
+ * Add a new configuration (the + symbol) and select **Python**
249
+ * Set **Script Path** to **PCOT/src/pcot/\_\_main\_\_.py**
250
+ * Make sure the interpreter is something like **Project Default (Python 3.11 (pcot))**, i.e. the Python interpreter of the pcot environment.
251
+ * You should now be able to run and debug PCOT.
252
+
253
+ ## Environment variables
254
+
255
+ It's a good idea, but not mandatory, to set the environment variable
256
+ **PCOTUSER** to a string of the form ```name <email>```. For example,
257
+ in Linux I have added the following to my **.bashrc** file:
258
+ ```
259
+ export PCOT_USER="Jim Finnis <jcf12@aber.ac.uk>"
260
+ ```
261
+ This data is added to all saved PCOT graphs. If the environment variable
262
+ is not set, the username returned by Python's getpass module is used
263
+ (e.g. 'jcf12').
264
+
265
+ ## Common runtime issues
266
+
267
+ ### Can't start Qt on Linux
268
+
269
+ This sometimes happens:
270
+ ```txt
271
+ qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
272
+ This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
273
+
274
+ Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
275
+
276
+ ```
277
+ Try this:
278
+ ```bash
279
+ export QT_DEBUG_PLUGINS=1
280
+ pcot
281
+ ```
282
+ to run the program again, and look at the output.
283
+ You might see errors like this (I've removed some stuff):
284
+ ```txt
285
+ QFactoryLoader::QFactoryLoader() checking directory path "[...]envs/pcot/bin/platforms" ...
286
+ Cannot load library [...]/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)
287
+ QLibraryPrivate::loadPlugin failed on "...[stuff removed].. (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)"
288
+ ```
289
+ If that's the case, install the missing package:
290
+ ```
291
+ sudo apt install libxcb-xinerama0
292
+ ```
293
+ That should help. Otherwise, send a message to us with the output from the ```QT_DEBUG_PLUGINS``` run and we will investigate.
294
+
295
+ ### Can't start Qt on Linux (PySide6 / Qt6)
296
+
297
+ Since moving to PySide6, you may see the same "Could not load the Qt platform plugin xcb" error
298
+ described above but caused by a different missing library. From Qt 6.5 onwards, the ```xcb```
299
+ platform plugin depends on ```libxcb-cursor0``` at runtime, and it isn't installed by default on
300
+ many Linux distributions (including a fresh Ubuntu install). If ```QT_DEBUG_PLUGINS=1``` shows
301
+ a complaint about ```libxcb-cursor.so.0```, install it with:
302
+ ```
303
+ sudo apt install libxcb-cursor0
304
+ ```
305
+
@@ -0,0 +1,268 @@
1
+ # PCOT
2
+
3
+ <img src="https://raw.githubusercontent.com/AU-ExoMars/PCOT/72e6f0a5920d82fcf7c3beb8faf26cc43ca96b2f/docs/pcotlogo.png" alt="PCOT logo" width="100"/>
4
+
5
+ **More documentation can be found [here](https://au-exomars.github.io/PCOT/)**
6
+
7
+ PCOT is a Python application and library primarily intended for
8
+ processing data from the Pancam
9
+ instrument on the Rosalind Franklin rover, although it lends itself
10
+ to any task involving processing multispectral image data.
11
+
12
+ For example, with PCOT you can:
13
+ * load ENVI (BSQ interleaved 4-byte float) and (to a basic level) PDS4 multispectral images
14
+ * load multiple images in other formats (e.g. PNG) and combine them into
15
+ multispectral images
16
+ * define regions of interest in the data
17
+ * perform mathematical operations
18
+ * view spectra and histograms
19
+
20
+ and many other things besides. PCOT is highly extensible and open-source,
21
+ so any missing functionality is easily added.
22
+
23
+ PCOT operates on a graph model - the data is processed through a set of nodes
24
+ which manipulate it in various ways (e.g. add regions of interest, perform
25
+ maths, splice images together, merge image channels, plot spectra). A PCOT
26
+ document describes this graph, and we
27
+ intend that documents are distributed along with the data they generate
28
+ to help reproducibility.
29
+
30
+ ## Installation
31
+
32
+ ### Installing with pip
33
+
34
+ PCOT can be installed from [PyPI](https://pypi.org/project/pcot/) into any Python 3.11 or
35
+ 3.12 environment (a fresh virtual environment or Conda environment is best):
36
+
37
+ ```shell
38
+ pip install pcot
39
+ ```
40
+
41
+ You can then run **pcot** to start the application, or `import pcot` to use it as a library.
42
+ To get updates, run **pip install --upgrade pcot**.
43
+
44
+ A pip install doesn't include the camera data files, which describe each camera's filters, or
45
+ the reflectance target data used for calibration. Download them from
46
+ [pcot.aber.ac.uk](https://pcot.aber.ac.uk) and put them somewhere convenient. The first time
47
+ PCOT starts it will say it has no camera data and offer to let you choose a directory: choose
48
+ the one holding the camera files. It will offer the same for the reflectance target data.
49
+
50
+ If you want to change PCOT itself, or follow the latest development version, install it from
51
+ the repository as described below instead.
52
+
53
+ ### Installing from the repository
54
+
55
+ PCOT is a Python program (and library) with a number of dependencies,
56
+ notably numpy and PySide6 (the official Python interface to Qt).
57
+ We find the best way to manage these is to use
58
+ [Anaconda](https://anaconda.com/)
59
+ and
60
+ [Poetry](https://python-poetry.org/).
61
+ Installation has been tested on Windows 10,
62
+ MacOS and Ubuntu 20.04.
63
+
64
+ ### Install Anaconda
65
+ The first thing you will need to do is install Anaconda, which can be done from here:
66
+
67
+ * Windows: https://docs.anaconda.com/anaconda/install/windows/
68
+ * Linux: https://docs.anaconda.com/anaconda/install/linux/
69
+ * MacOS: https://docs.anaconda.com/anaconda/install/mac-os/ (untested)
70
+
71
+ ### Obtain the software
72
+
73
+ This can be done by
74
+ either downloading the archive from Github and extracting it into a new
75
+ directory,
76
+ or cloning the repository. In both cases, the top level directory should be
77
+ called
78
+ PCOT (this isn't really mandatory but makes the instructions below simpler).
79
+ The best way to download is this:
80
+
81
+ * Open an Anaconda shell window (see below)
82
+ * If you have an SSH key set up for GitHub, type this command into the shell
83
+ (**changing the repository address if it is different**):
84
+ ```shell
85
+ git clone git@github.com:AU-ExoMars/PCOT.git
86
+ ```
87
+ * Otherwise type this:
88
+ ```shell
89
+ git clone https://github.com/AU-ExoMars/PCOT.git
90
+ ```
91
+ * You should now have a PCOT directory which will contain this file (as README.md)
92
+ and quite a few others.
93
+
94
+ #### Opening Anaconda's shell on different OSs
95
+ * **Windows:** Open the **Anaconda Powershell Prompt** application, which will have been installed when you
96
+ installed Anaconda. This can be found in the Start menu under Anaconda3,
97
+ or in the applications list in Anaconda Navigator (which is also in the Start
98
+ menu in the same place).
99
+ * **Linux and MacOS**: just open a Bash shell
100
+
101
+ ### Installing on Ubuntu / MacOS
102
+ Assuming you have successfully installed Anaconda and cloned or downloaded
103
+ PCOT as above:
104
+
105
+ * Open a bash shell
106
+ * **cd** to the PCOT directory (which contains this file).
107
+ * Run the command **conda create -n pcot python=3.11 poetry**.
108
+ This will create an environment called **pcot** which uses Python 3.11 and
109
+ the Poetry dependency and packaging manager. It may take some time.
110
+ * Activate the environment with **conda activate pcot**.
111
+ * Now run **poetry install**. This will set up all the packages PCOT is
112
+ dependent on and install PCOT. See [below](#problems-with-pre-existing-python-packages) if you see errors here.
113
+ * You should now be able to run **pcot** to start the application.
114
+
115
+ PCOT now uses PySide6, which ships native wheels for Apple Silicon, so the Rosetta/osx-64
116
+ workaround formerly needed here for PySide2/shiboken2 on modern Macs is no longer required.
117
+
118
+ ### Installing on Windows
119
+ Assuming you have successfully installed Anaconda and cloned or downloaded PCOT as above:
120
+
121
+ * Open the Anaconda PowerShell Prompt application from the Start Menu.
122
+ * **cd** to the PCOT directory (which contains this file).
123
+ * Run the command **conda create -n pcot python=3.11 poetry**.
124
+ This will create an environment called **pcot** which uses Python 3.11 and the Poetry dependency
125
+ and packaging manager. It may take some time.
126
+ * Activate the environment with **conda activate pcot**.
127
+ * Now run **poetry install**. This will set up all the packages PCOT is dependent on and install
128
+ PCOT. See [below](#problems-with-pre-existing-python-packages) if you see errors here.
129
+ * You should now be able to run **pcot** to start the application.
130
+
131
+ ### Problems with pre-existing Python packages
132
+ You may have pre-existing packages in your system level Python installation which conflict
133
+ with those in Anaconda. Typically, this manifests as lots of errors when you run
134
+ `poetry install`. To fix this, tell Anaconda not to look at your system install at all:
135
+ ```
136
+ conda env config vars set PYTHONNOUSERSITE=1 -n pcot
137
+ conda deactivate
138
+ conda activate pcot
139
+ ```
140
+
141
+ ## Updating PCOT
142
+
143
+ You can usually upgrade PCOT just by running **git pull** in your PCOT
144
+ directory, assuming you cloned it. If you downloaded it, you'll need to download
145
+ the PCOT directory again.
146
+
147
+ It's generally best to do **poetry install** once in a while to make sure
148
+ all the packages are correct, particularly if you notice **poetry.lock**
149
+ has changed.
150
+
151
+ Finally, **if the Python version has changed** you will need to rebuild the
152
+ Conda environment from scratch. The following instructions assume you
153
+ are using a shell of some sort:
154
+ * **conda deactivate pcot** will make sure you are not actively using the
155
+ environment
156
+ * **conda env remove -n pcot** will delete the old environment
157
+ * **conda create -n pcot python=3.11 poetry** will create a new environment -
158
+ replace "3.11" with the correct new version
159
+ * **poetry install** will reinstall all the packages.
160
+
161
+ If you are using Pycharm you will probably need to refer to the instructions below on **Running PCOT inside Pycharm**
162
+ to update the interpreter to the new version.
163
+
164
+
165
+ ## Running PCOT
166
+ Open an Anaconda shell and run the following commands (assuming you installed PCOT into your home directory):
167
+ ```shell
168
+ cd PCOT
169
+ conda activate pcot
170
+ pcot
171
+ ```
172
+
173
+ ### Create an 'executable' icon (MacOS)
174
+ Note: these instructions were created and tested under MacOS but should be usable on other systems
175
+ with some adaptation.
176
+
177
+ The above commands can be put into a bash script which will allow PCOT to be run by clicking on an icon.
178
+
179
+ Open a text editor (e.g. TextEdit, Notepad++, Sublime, etc) and create a new file called **pcot.sh**, and save it
180
+ to your desktop (or wherever you want the icon). Add the following to this file:
181
+ ```shell
182
+ #!/usr/bin/env bash
183
+ eval "$(conda shell.bash hook)"
184
+ conda activate pcot
185
+ pcot
186
+ ```
187
+ Open a terminal window and navigate to the location of your new script, then run the following command to give it
188
+ permission to run:
189
+ ```shell
190
+ chmod +x pcot
191
+ ```
192
+
193
+ You can now use the icon to run PCOT.
194
+
195
+ Note: you may need to set up your system to open ```.sh``` files with Terminal by default.
196
+
197
+ ## Running PCOT inside Pycharm
198
+ These instructions may be useful if you want to run PCOT inside a debugger - for example, if you
199
+ are testing a custom node.
200
+ * First set up the Conda environment and interpreter:
201
+ * Open PyCharm and open the PCOT directory as an existing project.
202
+ * Open **File/Settings..** (Ctrl+Alt+S)
203
+ * Select **Project:PCOT / Python Interpreter**
204
+ * If the Python Interpreter is not already Python with something like **anaconda3/envs/pcot/bin/python**
205
+ * Select the cogwheel to the right of the Python Interpreter dropdown and then select **Add**.
206
+ * Select **Conda Environment**.
207
+ * Select **Existing Environment**.
208
+ * Select the environment: it should be something like **anaconda3/envs/pcot/bin/python**.
209
+ * Select **OK**.
210
+ * Now set up the run configuration:
211
+ * Select **Edit Configurations...** (or it might be **Add Configuration...**) from the configurations drop down in the menu bar
212
+ * Add a new configuration (the + symbol) and select **Python**
213
+ * Set **Script Path** to **PCOT/src/pcot/\_\_main\_\_.py**
214
+ * Make sure the interpreter is something like **Project Default (Python 3.11 (pcot))**, i.e. the Python interpreter of the pcot environment.
215
+ * You should now be able to run and debug PCOT.
216
+
217
+ ## Environment variables
218
+
219
+ It's a good idea, but not mandatory, to set the environment variable
220
+ **PCOTUSER** to a string of the form ```name <email>```. For example,
221
+ in Linux I have added the following to my **.bashrc** file:
222
+ ```
223
+ export PCOT_USER="Jim Finnis <jcf12@aber.ac.uk>"
224
+ ```
225
+ This data is added to all saved PCOT graphs. If the environment variable
226
+ is not set, the username returned by Python's getpass module is used
227
+ (e.g. 'jcf12').
228
+
229
+ ## Common runtime issues
230
+
231
+ ### Can't start Qt on Linux
232
+
233
+ This sometimes happens:
234
+ ```txt
235
+ qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
236
+ This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
237
+
238
+ Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
239
+
240
+ ```
241
+ Try this:
242
+ ```bash
243
+ export QT_DEBUG_PLUGINS=1
244
+ pcot
245
+ ```
246
+ to run the program again, and look at the output.
247
+ You might see errors like this (I've removed some stuff):
248
+ ```txt
249
+ QFactoryLoader::QFactoryLoader() checking directory path "[...]envs/pcot/bin/platforms" ...
250
+ Cannot load library [...]/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)
251
+ QLibraryPrivate::loadPlugin failed on "...[stuff removed].. (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)"
252
+ ```
253
+ If that's the case, install the missing package:
254
+ ```
255
+ sudo apt install libxcb-xinerama0
256
+ ```
257
+ That should help. Otherwise, send a message to us with the output from the ```QT_DEBUG_PLUGINS``` run and we will investigate.
258
+
259
+ ### Can't start Qt on Linux (PySide6 / Qt6)
260
+
261
+ Since moving to PySide6, you may see the same "Could not load the Qt platform plugin xcb" error
262
+ described above but caused by a different missing library. From Qt 6.5 onwards, the ```xcb```
263
+ platform plugin depends on ```libxcb-cursor0``` at runtime, and it isn't installed by default on
264
+ many Linux distributions (including a fresh Ubuntu install). If ```QT_DEBUG_PLUGINS=1``` shows
265
+ a complaint about ```libxcb-cursor.so.0```, install it with:
266
+ ```
267
+ sudo apt install libxcb-cursor0
268
+ ```
@@ -0,0 +1,100 @@
1
+ [tool.poetry]
2
+ name = "pcot"
3
+ version = "1.1.0rc1" # must match the number in src/pcot/VERSION.txt (checked by tests/config/test_version_check.py)
4
+ description = "PanCam Operations Toolkit"
5
+ authors = ["Jim Finnis <jcf12@aber.ac.uk>"]
6
+ license = "MIT"
7
+ readme = "README.md"
8
+ repository = "https://github.com/AU-ExoMars/PCOT"
9
+ documentation = "https://au-exomars.github.io/PCOT/"
10
+ keywords = ["calibration", "processing", "image", "research"]
11
+ classifiers = [
12
+ "Programming Language :: Python :: 3",
13
+ "Operating System :: OS Independent",
14
+ "Development Status :: 4 - Beta",
15
+ "Intended Audience :: Science/Research",
16
+ "Topic :: Scientific/Engineering",
17
+ ]
18
+
19
+ [tool.poetry.urls]
20
+ "Bug Tracker" = "https://github.com/AU-ExoMars/PCOT/issues"
21
+
22
+ [tool.poetry.dependencies]
23
+ python = ">=3.11,<3.13"
24
+ PySide6 = ">=6.9.3,<7"
25
+ opencv-python-headless = ">=4.10.0.84,<5"
26
+ scikit-image = ">=0.24,<0.27"
27
+ numpy = ">=1.26,<3"
28
+ matplotlib = "^3.9"
29
+ pds4-tools = "^1.2"
30
+ markdown = "^3.3.6"
31
+ click = "^8.1"
32
+ # these four are imported directly by PCOT; they used to arrive only as dependencies
33
+ # of other packages (mkdocs, scikit-image, matplotlib), which pip users can't rely on
34
+ PyYAML = "^6.0"
35
+ Jinja2 = "^3.1"
36
+ scipy = "^1.13"
37
+ python-dateutil = "^2.8"
38
+ # proctools = { path = "./dist/proctools", develop = true }
39
+ proctools = "^0.3.1"
40
+
41
+
42
+ # Future:
43
+ #passthrough = "0.3.2"
44
+
45
+ [tool.poetry.group.dev.dependencies]
46
+ pytest = ">=6.0"
47
+ black = "^20.8b1"
48
+ isort = "^5.8.0"
49
+
50
+ # only needed to build the documentation site, not to run PCOT
51
+ [tool.poetry.group.docs.dependencies]
52
+ mkdocs = "^1.2.3"
53
+ pymdown-extensions = ">=9.1"
54
+
55
+ [tool.pytest.ini_options]
56
+ python_functions = "test_"
57
+ minversion = "6.0"
58
+ testpaths = [
59
+ "tests",
60
+ ]
61
+
62
+ # these warnings are for datumfuncs which Pytest thinks are tests.
63
+ filterwarnings = [
64
+ "ignore:cannot collect 'testimg' because it is not a function",
65
+ "ignore:cannot collect 'testfunc1' because it is not a function",
66
+ "ignore:cannot collect 'testfunc2' because it is not a function"
67
+ ]
68
+
69
+ [build-system]
70
+ requires = ["poetry-core>=1.0.0"]
71
+ build-backend = "poetry.core.masonry.api"
72
+
73
+ [tool.poetry.scripts]
74
+ pcot = 'pcot.main:main'
75
+ pcotbatch = 'pcot.batch:main'
76
+
77
+ [tool.black]
78
+ line-length = 88
79
+ target-version = ['py311']
80
+ include = '\.pyi?$'
81
+ exclude = '''
82
+ (
83
+ /(
84
+ | \.git
85
+ | build
86
+ | dist
87
+ )/
88
+ )
89
+ '''
90
+ experimental-string-processing = true
91
+
92
+
93
+ [tool.isort] # black compatibility
94
+ multi_line_output = 3
95
+ include_trailing_comma = true
96
+ force_grid_wrap = 0
97
+ use_parentheses = true
98
+ ensure_newline_before_comments = true
99
+ line_length = 88
100
+