[{"content":"This document shows the benchmark scores of HomCloud. Computation times and maximal memory usages for persistence diagram computation are measured by time -v command. The benchmark results of the inverse analysis are also shown.\nPC spec and OS are as follows:\nCPU: AMD Ryzen 9 5950X Memory: 128GB OS: Ubuntu 20.04 A persistence diagram is computed on a single core. Parallel computing is not used. The time and memory is measured only one time, and the result of this document is not the average time and memory.\nAlpha filtration from 3D pointcloud # Each point is randomly drawn from a uniform distribution on (-1,1)^3.\n10,000 points - 2.4sec 350MB (pdgm file size: 13MB) 1d optimal volume with cutoff_radius=0.1 - 3.5sec 240MB 100,000 points - 23sec 3GB (pdgm file size: 136MB) 1d optimal volume with cutoff_radius=0.1 - 32sec 1.6GB 1,000,000 points - 260sec, 27GB (pdgm file size: 1.5GB) 1d optimal volume with cutoff_radius=0.1 - 190sec 15GB 3,000,000 points - 800sec, 80GB (pdgm file size: 4.4GB) 1d optimal volume with cutoff_radius=0.1 - 310sec 43GB Periodic alpha filtration from 3D pointcloud # Each point is randomly drawn from a uniform distribution on (-1,1)^3.\n10000 points - 3.6sec 380MB (pdgm file size: 13MB) 100000 points - 31sec 3GB (pdgm file size: 137MB) 1000000 points - 350sec, 27GB (pdgm file size: 1.5GB) Remark # In HomCloud, alpha filtration is computed using the CGAL library. A PD is calculated using PHAT.\n3D Bitmap # The following two types of data were used for 3D data. One is that each voxel value is random, and the sublevel persistence diagram is computed. The other is the data obtained by distance transform. The data by distance transform is more ordered than the random voxel value data, and the order makes the computation faster.\nLevelset persistence diagram from random voxel data # 100x100x100 - 5sec 570MB 300x300x300 - 614sec 11GB Distance transform data # 100x100x100 - 1.6sec 310MB 300x300x300 - 50sec 6.4GB 600x600x600 - 530sec 60GB 800x800x800 - not comuputable because of memoly limitation. We plan to try bigger computer Remark # The algorithm for computing the PD from 2D/3D bitmap is separated into the homccube3 library.\nRips # A point cloud in 10-dimensional Euclidean space is randomly uniformly generated and distance matrix with Euclidean distance is computed.\n1000 points maxdim=1: 1.6sec 210MB maxdim=2: 90sec 10GB maxdim=3: Memory limitation 10000 points maxdim=1: 500sec, 16GB maxdim=2: Memory limitation 20000 points maxdim=1: 2000sec, 65GB 50000 points maxdim=1: Memory limitation Remark # Ripser is used in HomCloud.\nBenchmark code # Download\n","date":"2026/07/23","externalUrl":null,"permalink":"/benchmarks/","section":"HomCloud","summary":"","title":"HomCloud Benchmarks","type":"page"},{"content":" NAME # abstract_filtration - Compute a persistence diagram from an explicit description of a filtered boundary map\nSYNOPSIS # homcloud-abstract-filtration [-h] [-V] [-M SAVE_BOUNDARY_MAP] [--license] input output This program can also be invoked as python3 -m homcloud.cli.abstract_filtration.\nALIAS # homcloud-abstract-filtration DESCRIPTION # This program reads a text description of a filtered cell complex — each cell\u0026rsquo;s dimension, filtration time, and explicit boundary — and computes a persistence diagram, written as a .pdgm file (abstract filtration type). This is the most general/low-level way to feed a filtration into HomCloud when your data does not fit the point-cloud (homcloud-pc-alpha, homcloud-rips) or picture (homcloud-pict-binarize-nd, \u0026hellip;) tools.\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -M SAVE_BOUNDARY_MAP, --save-boundary-map SAVE_BOUNDARY_MAP save boundary map (yes/no, *default:yes*) --license show license and exit Unlike most other homcloud-* commands, -M/--save-boundary-map defaults to on here, so the output is ready for homcloud-optvol unless you explicitly pass -M off.\nINPUT FILE FORMAT # The input is a plain-text file, one cell per non-blank, non-comment, non-option line, in filtration order (cell ids are assigned 0, 1, 2, \u0026hellip; in the order they appear). A line starting with # is a comment and is ignored.\nEach cell line has the form:\nid dim time = indices : coefficients id — the cell\u0026rsquo;s index; must equal its 0-based position among cell lines (i.e. cells must be listed in id order starting at 0). dim — the dimension of the cell (0 for a vertex, 1 for an edge, \u0026hellip;). time — the filtration (birth) time of the cell; times must be non-decreasing from one line to the next. indices — a whitespace-separated list of the ids of the cells that make up this cell\u0026rsquo;s boundary. coefficients — a whitespace-separated list, the same length as indices, of the (mod 2) boundary coefficients for each of those cells. A coefficient is treated as 1 (included in the boundary) if it is odd, 0 (excluded) if it is even. The overall filtration dimension is the maximum dim over all cells.\nTwo option lines may appear before any cell line:\nautoid: yes|no autosymbol: yes|no autoid (default no): when yes, the id field is omitted from every cell line (ids are assigned automatically in order):\ndim time = indices : coefficients autosymbol (default yes): when no, every cell line must additionally give an explicit symbol (name), right after id (or first, if autoid is also yes):\nid symbol dim time = indices : coefficients A symbol must match [a-zA-Z0-9_]+. When autosymbol is yes (the default), each cell\u0026rsquo;s symbol is just its id as a string.\nExample (3 vertices and 2 edges forming a path, default autoid:no, autosymbol:yes):\n# vertices 0 0 0.0 = : 1 0 0.0 = : 2 0 0.0 = : # edges 3 1 1.0 = 0 1 : 1 1 4 1 1.0 = 1 2 : 1 1 OUTPUT FORMAT # output is always a .pdgm file (abstract filtration type).\n","externalUrl":null,"permalink":"/cli-docs/abstract_filtration/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # dump_diagram - Display all birth-death pairs of a persistence diagram\nSYNOPSIS # homcloud-dump-diagram [-h] [-V] -d DEGREE [-T TYPE] [-N] [-o OUTPUT] [-S SHOW_SIMPLICES] [-E SHOW_ESSENTIAL_PAIRS] [-s SYMBOLS] input This program can also be invoked as python3 -m homcloud.cli.dump_diagram.\nALIAS # homcloud-dump-diagram DESCRIPTION # This program displays all birth-death pairs on your console.\nIf -o option is given, the result is saved into the file instead of showing pairs on the console.\nIf -S yes is given, the geometric information (positions/vertices) of the birth and death cells is also displayed; this requires the input pdgm file to contain that information (see the -M option of homcloud-pc-alpha, homcloud-rips, homcloud-pict-binarize-nd, etc.).\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -d DEGREE, --degree DEGREE degree of PH -T TYPE, --type TYPE input file format (pdgm, text) (default: autodetect) -N, --negate flip the sign of birth/death times for superlevel persistence (default: False) -o OUTPUT, --output OUTPUT output text file -S SHOW_SIMPLICES, --show-simplices SHOW_SIMPLICES show birth/death simplices (yes/no, default:no) -E SHOW_ESSENTIAL_PAIRS, --show-essential-pairs SHOW_ESSENTIAL_PAIRS show essential pairs (yes/no, default:no) -s SYMBOLS, --symbols SYMBOLS show birth/death simplices by symbols(yes/no default:no) input is a .pdgm file (or a text file of birth-death pairs when -T text is used).\nOUTPUT FORMAT # When -E yes is given, all essential pairs (pairs with infinite death time) are appended after the finite pairs. If no is given (the default), essential pairs are not shown.\nCASE WITH -S no (default) # Birth times are shown on the 1st column, and death times are shown on the 2nd column. The columns are separated by a space.\nExample:\nb1 d1 b2 d2 : CASE WITH -S yes # Birth times are shown on the 1st column, death times are shown on the 2nd column, the geometry of the birth cell is shown on the 3rd column, and the geometry of the death cell is shown on the 4th column. The columns are separated by a space. The shape of the geometry depends on the filtration type of the input pdgm file:\nFor a cubical/bitmap filtration (homcloud-pict-binarize-nd, homcloud-pict-pixel-levelset-nd, \u0026hellip;), each cell is shown as the pixel coordinates of its vertices. For an alpha or Vietoris-Rips filtration, each cell is shown as the point coordinates of its vertices. For a simplicial/abstract filtration, each cell is shown as the list of its vertices (indices, or symbols when -s yes is given). Example (cubical filtration):\nb1 d1 (x_b1,y_b1) (x_d1,y_d2) b2 d2 (x_b2,y_b2) (x_d2,y_d2) : Example (alpha filtration):\nb1 d1 {(x_b11,y_b11,z_b11),(x_b12,y_b12,z_b12)} {(x_d11,y_d11,z_d11),(x_d12,y_d12,z_d12),(x_d13,y_d13,z_d13)} b2 d2 {(x_b21,y_b21,z_b21),(x_b22,y_b22,z_b22)} {(x_d21,y_d21,z_d21),(x_d22,y_d22,z_d22),(x_d23,y_d23,z_d23)} : If -s yes is also given, vertices are shown by their symbols (from --vertex-symbols, used when the diagram was created) instead of coordinates or indices.\n","externalUrl":null,"permalink":"/cli-docs/dump_diagram/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # optvol - Compute optimal volumes and variants of stable/tightened volumes\nSYNOPSIS # homcloud-optvol [-h] [-V] [--license] -d DEGREE [-x X] [-y Y] [-X X_RANGE] [-Y Y_RANGE] [-j JSON_OUTPUT] [-T TYPE] [-e EPSILON] [-c CUTOFF_RADIUS] [-n RETRY] [--skip-infeasible SKIP_INFEASIBLE] [--solver SOLVER] [-O OPTION] input This program can also be invoked as python3 -m homcloud.cli.optvol.\nALIAS # homcloud-optvol DESCRIPTION # This program computes optimal volumes and volume-optimal cycles for given birth-death pairs.\nThe input file (a .pdgm file) must have the boundary map information saved in it. This is done by giving -M on to the program that created the diagram, for example:\nhomcloud-pc-alpha homcloud-rips homcloud-abstract-filtration homcloud-pict-binarize-nd homcloud-pict-pixel-levelset-nd You can specify a single point by using the -x and -y options. The program chooses the closest birth-death pair to that point and computes an optimal volume / volume-optimal cycle for the pair.\nYou can also specify a rectangle region on the persistence diagram using the -X and -Y options. The program computes the volume-optimal cycle for every birth-death pair in the given rectangle.\nOPTIONS # positional arguments: input input filename options: -h, --help show this help message and exit -V, --version show program's version number and exit --license show license and exit target: -d DEGREE, --degree DEGREE degree of PH -x X birth time of the pair -y Y death time of the pair -X X_RANGE, --x-range X_RANGE birth time of the pair -Y Y_RANGE, --y-range Y_RANGE death time of the pair output options: -j JSON_OUTPUT, --json-output JSON_OUTPUT output in json format computation parameters: -T TYPE, --type TYPE target type (*optimal-volume*, tightened-volume, or tightened-subvolume -e EPSILON, --epsilon EPSILON tighened-volume/subvolume epsilon -c CUTOFF_RADIUS, --cutoff-radius CUTOFF_RADIUS cut-off radius in R^n -n RETRY, --retry RETRY number of retry --skip-infeasible SKIP_INFEASIBLE skip infeasible (on/*off*) solver parameters: --solver SOLVER LP solver name -O OPTION, --option OPTION options for LP solver Exactly one of the point query (-x/-y) or the rectangle query (-X/-Y) must be given; otherwise the program raises an error.\n-c/--cutoff-radius and -n/--retry only have an effect for alpha and cubical filtrations (where a spatial neighborhood is meaningful); they are ignored for abstract and simplicial filtrations.\nOUTPUT FORMAT # The output format of this module (written to the file given by -j/--json-output) is JSON.\n{ \u0026quot;format-version\u0026quot;: 2.0, /* version of the format of this file */ \u0026quot;query\u0026quot;: query, /* Query information */ \u0026quot;result\u0026quot;: array of result /* One entry per queried birth-death pair */ } query: { \u0026quot;degree\u0026quot;: int, /* degree of PH */ \u0026quot;solver-name\u0026quot;: string, /* LP solver class name */ \u0026quot;solver-options\u0026quot;: string or null, /* LP solver options */ \u0026quot;cutoff-radius\u0026quot;: double, /* cutoff radius, only for alpha/cubical filtrations */ \u0026quot;num-retry\u0026quot;: int, /* number of retries, only for alpha/cubical filtrations */ \u0026quot;query-target\u0026quot;: string, /* \u0026quot;optimal-volume\u0026quot;, \u0026quot;tightened-volume\u0026quot;, or \u0026quot;tightened-subvolume\u0026quot; */ \u0026quot;birth\u0026quot;: double, /* the birth time for a point query */ \u0026quot;death\u0026quot;: double, /* the death time for a point query */ \u0026quot;birth-range\u0026quot;: [double, double], /* the range of birth times for a rectangle query */ \u0026quot;death-range\u0026quot;: [double, double], /* the range of death times for a rectangle query */ \u0026quot;skip-infeasible\u0026quot;: bool /* only for a rectangle query */ } result (success): { \u0026quot;birth-time\u0026quot;: double, \u0026quot;death-time\u0026quot;: double, \u0026quot;birth-index\u0026quot;: int, \u0026quot;death-index\u0026quot;: int, \u0026quot;success\u0026quot;: true, \u0026quot;tightened-subvolume\u0026quot;: result or null, /* nested tightened subvolume, when applicable */ \u0026quot;points\u0026quot;: array of point, /* all vertices in the volume; alpha/cubical only */ \u0026quot;simplices\u0026quot;: array of simplex, /* all simplices in the volume; alpha only */ \u0026quot;cubes\u0026quot;: array of cube, /* all cubes in the volume; cubical only */ \u0026quot;cells\u0026quot;: array of cell, /* all cells in the volume; abstract only */ \u0026quot;boundary\u0026quot;: array of simplex/cube/cell, /* the boundary of the volume */ \u0026quot;boundary-points\u0026quot;: array of point, /* boundary vertices; alpha/cubical only */ \u0026quot;points-symbols\u0026quot;: array of symbol, /* all vertices in the volume, by symbol; alpha/simplicial only */ \u0026quot;simplices-symbols\u0026quot;: array of symbol-simplex, /* alpha/simplicial only */ \u0026quot;boundary-symbols\u0026quot;: array of symbol-simplex, /* alpha/simplicial only */ \u0026quot;boundary-points-symbols\u0026quot;: array of symbol, /* alpha/simplicial only */ \u0026quot;children\u0026quot;: array of pair /* children pairs' information */ } result (failure; a point query always returns its result even on failure, a rectangle query only includes a failure entry for an infeasible pair when `--skip-infeasible on` is given): { \u0026quot;birth-time\u0026quot;: double, \u0026quot;death-time\u0026quot;: double, \u0026quot;success\u0026quot;: false, \u0026quot;status\u0026quot;: string /* PuLP LP status, e.g. \u0026quot;Infeasible\u0026quot; */ } pair: { \u0026quot;birth-time\u0026quot;: double, \u0026quot;death-time\u0026quot;: double, \u0026quot;birth-index\u0026quot;: int, \u0026quot;death-index\u0026quot;: int } point: array of float simplex: array of point cell: array of point-or-symbol symbol: string symbol-simplex: array of symbol cube: [array of int, array of bool] For a rectangle query, an infeasible pair aborts the whole command with an error unless --skip-infeasible on is given, in which case it is recorded as a failure result instead. A point query never aborts: an infeasible pair is simply returned as a single failure result.\nEXAMPLE # A single pair query.\nhomcloud-optvol -d 1 -x 2.5 -y 6.2 -j voc.json example.pdgm Rectangle query.\nhomcloud-optvol -d 1 -X \u0026quot;[2.4:2.5]\u0026quot; -Y \u0026quot;[6.2:6.3]\u0026quot; -j voc.json example.pdgm NOTES # The -P/--invoke-paraview option that used to launch ParaView on the computed volume has been removed; visualize the resulting JSON with homcloud-view-index-pict/homcloud-pict-show-volume-2d, or with your own ParaView/matplotlib script instead.\n","externalUrl":null,"permalink":"/cli-docs/optvol/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # pc_alpha - Compute a persistence diagram from an alpha filtration of a point cloud\nSYNOPSIS # homcloud-pc-alpha [-h] [-V] [-t TYPE] [-n NOISE] [-d DIMENSION] [-w] [--square] [--no-square] [-P] [-A] [--save-suppl-info SAVE_SUPPL_INFO] [-M SAVE_BOUNDARY_MAP] [--save-phtrees SAVE_PHTREES] [--algorithm ALGORITHM] [--vertex-symbols VERTEX_SYMBOLS] [--periodicity xmin xmax ymin ymax zmin zmax] [--license] INPUT OUTPUT This program can also be invoked as python3 -m homcloud.cli.pc_alpha.\nALIAS # homcloud-pc-alpha DESCRIPTION # This program computes a persistence diagram from a (weighted or non-weighted) alpha filtration built from a 2D/3D point cloud, and writes the result as a .pdgm file.\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -t TYPE, --type TYPE input file format type -n NOISE, --noise NOISE level of additive noise -d DIMENSION, --dimension DIMENSION dimension of the input data -w, --weighted use an weighted alpha filtration --square squared output (default) --no-square no squared output, if a birth radius is negative, the output is -sqrt(abs(r)) -P, --partial-filtration Compute partial filtration (relative homology) -A, --check-acyclicity Check acyclicity for paritial filtration --save-suppl-info SAVE_SUPPL_INFO save supplementary information of PD (yes/no, default:yes) -M SAVE_BOUNDARY_MAP, --save-boundary-map SAVE_BOUNDARY_MAP save boundary map into the output pdgm file (only available with phat-* algorithms, *on*/off) --save-phtrees SAVE_PHTREES save phtrees into output pdgm file (only available with phat-* algorithms, on/*off*) --algorithm ALGORITHM algorithm (phat-twist(default), phat-chunk-parallel) --vertex-symbols VERTEX_SYMBOLS vertex symbols file --periodicity xmin xmax ymin ymax zmin zmax use a periodic alpha filtration --license show license and exit INPUT FILE FORMAT # You can use both weighted and non-weighted alpha filtration.\nThe input format of a non-weighted 3d point cloud is:\n# A line starting with a sharp sign is ignored x_1 y_1 z_1 x_2 y_2 z_2 : You can use a 2d point cloud:\nx_1 y_1 x_2 y_2 : In the weighted case, the input file for 3d is:\nx_1 y_1 z_1 w_1 x_2 y_2 z_2 w_2 : The weights should be squared (for example, you should put the square of the van der Waals radius). The lines starting with a sharp sign are always ignored.\n2D weighted alpha filtration is not supported because of the limitation of CGAL.\nOUTPUT FILE # This program always writes a .pdgm file into OUTPUT. Old output formats (.complex, .icomplex, .diagram, .idiagram) are no longer supported; giving OUTPUT one of these extensions raises an error.\nIf -M on (the default) is given, the boundary map is embedded into the pdgm file, which is required by homcloud-optvol and other volume-optimal-cycle tools.\nNOTES # This module was previously named pc2diphacomplex and renamed to pc_alpha. The old -I/--combine-index-map and -D/--convert-to-diagram options (used when the program produced dipha/idipha complex or diagram files) have been removed: the program always computes and writes a pdgm file directly now.\n-P/--partial-filtration and -A/--check-acyclicity are still accepted by the argument parser but are currently unimplemented; the program raises an internal assertion error if either is given.\n","externalUrl":null,"permalink":"/cli-docs/pc_alpha/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # phtrees - Query optimal/stable volumes from a PH tree file\nSYNOPSIS # homcloud-phtrees [-h] [-V] [-x X] [-y Y] [-X X_RANGE] [-Y Y_RANGE] [-j JSON_OUTPUT] [-S STABLE_VOLUME] input This program can also be invoked as python3 -m homcloud.cli.phtrees.\nALIAS # homcloud-phtrees DESCRIPTION # This program queries a PH-tree .pdgm file (produced by homcloud-pc-alpha --save-phtrees on) for the optimal volume (or a stabilized/tightened variant of it) of one or more birth-death pairs, without solving any LP problem — the volumes are read directly out of the pre-built tree structure.\nThe queried degree is always (dim - 1), where dim is the dimension recorded in the input file; there is no -d/--degree option.\nYou can specify a single point by using the -x and -y options. The program chooses the closest birth-death pair to that point.\nYou can also specify a rectangle region on the persistence diagram using the -X and -Y options. The program returns every birth-death pair in the given rectangle.\nIf -S/--stable-volume is given, instead of the raw optimal volume the program returns the stable volume: the sub-volume obtained by discarding children whose birth time is not more than STABLE_VOLUME (epsilon) later than the queried pair\u0026rsquo;s birth time.\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -x X birth time of the pair -y Y death time of the pair -X X_RANGE, --x-range X_RANGE birth time of the pair -Y Y_RANGE, --y-range Y_RANGE death time of the pair -j JSON_OUTPUT, --json-output JSON_OUTPUT output in json format -S STABLE_VOLUME, --stable-volume STABLE_VOLUME stable volume epsilon input must be a .pdgm file whose filtration type is alpha and which was written with the PH-tree chunk included, i.e. produced by homcloud-pc-alpha --save-phtrees on -M on (the boundary map, -M on, is required to compute the tree).\nExactly one of the point query (-x/-y) or the rectangle query (-X/-Y) should be given. If -j/--json-output is not given, the program silently computes nothing observable (there is no console output).\nOUTPUT FORMAT # The output format (written to the file given by -j/--json-output) is JSON:\n{ \u0026quot;format-version\u0026quot;: 2, \u0026quot;query\u0026quot;: { \u0026quot;query-type\u0026quot;: \u0026quot;signle\u0026quot;, /* [sic] always this literal string */ \u0026quot;query-target\u0026quot;: string, /* \u0026quot;optimal-volume\u0026quot; or \u0026quot;stable-volume\u0026quot; */ \u0026quot;degree\u0026quot;: int, /* dim - 1 */ \u0026quot;birth\u0026quot;: double or [double, double], /* birth time, or birth range for a rectangle query */ \u0026quot;death\u0026quot;: double or [double, double], /* death time, or death range for a rectangle query */ \u0026quot;ancestor-pairs\u0026quot;: false, /* reserved, always false */ \u0026quot;query-children\u0026quot;: false /* reserved, always false */ }, \u0026quot;dimension\u0026quot;: int, /* dim, as recorded in the input file */ \u0026quot;result\u0026quot;: array of volume } volume: { \u0026quot;birth-index\u0026quot;: int, \u0026quot;death-index\u0026quot;: int, \u0026quot;birth-time\u0026quot;: double, \u0026quot;death-time\u0026quot;: double, \u0026quot;boundary\u0026quot;: array of simplex, /* boundary of the volume, by point coordinates */ \u0026quot;boundary-by-symbols\u0026quot;: array of symbol-simplex, \u0026quot;boundary-vertices\u0026quot;: array of point, /* boundary vertices, by coordinates */ \u0026quot;boundary-vertices-by-symbols\u0026quot;: array of symbol, \u0026quot;vertices\u0026quot;: array of point, /* all vertices in the volume */ \u0026quot;vertices-by-symbols\u0026quot;: array of symbol, \u0026quot;simplices\u0026quot;: array of simplex, /* all simplices in the volume */ \u0026quot;simplices-by-symbols\u0026quot;: array of symbol-simplex, \u0026quot;children\u0026quot;: array of child } child: { \u0026quot;birth-index\u0026quot;: int, \u0026quot;death-index\u0026quot;: int, \u0026quot;birth-time\u0026quot;: double, \u0026quot;death-time\u0026quot;: double, \u0026quot;children\u0026quot;: array of child /* nested recursively */ } point: array of float simplex: array of point symbol: string symbol-simplex: array of symbol Note that for a rectangle query, the \u0026quot;birth\u0026quot;/\u0026quot;death\u0026quot; fields of query hold the [min, max] range given by -X/-Y, not a single value, despite the singular field names.\nEXAMPLE # homcloud-pc-alpha -d 3 --save-phtrees on -M on points.txt points.pdgm homcloud-phtrees -x 1.0 -y 4.0 -j result.json points.pdgm homcloud-phtrees -X \u0026quot;[0.5:1.5]\u0026quot; -Y \u0026quot;[3.5:4.5]\u0026quot; -S 0.1 -j stable.json points.pdgm NOTES # If neither a point query nor a rectangle query is given (or an incomplete one, e.g. only -x without -y), the program currently fails with an unhandled UnboundLocalError rather than a clear error message; always give a complete -x/-y pair or a complete -X/-Y pair.\nThere used to be a separate homcloud-build-phtrees command that wrote a narrower, standalone PH-tree .pdgm file (filtration type alpha-phtrees) for this program to query. That command has been removed: it computed exactly the same tree as homcloud-pc-alpha --save-phtrees on (both call the same homcloud.build_phtrees.PHTrees class internally), its own output format was never fully supported by the rest of HomCloud (in particular homcloud-phtrees itself could not read it), and its one structural advantage — skipping the boundary-matrix reduction step — did not show a measurable speed benefit in practice. Use homcloud-pc-alpha --save-phtrees on -M on instead, as in the example above.\n","externalUrl":null,"permalink":"/cli-docs/phtrees/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # pict.binarize_nd - Compute a persistence diagram from an N-dimensional picture by using a cubical dilation-erosion filtration of its binarization\nSYNOPSIS # homcloud-pict-binarize-nd [-h] [-V] [-T TYPE] [-m MODE] [-t THRESHOLD] [--gt GT] [--lt LT] -o OUTPUT [-s] [--metric METRIC] [-C] [-p PERIODIC] [--mask MASK] [--algorithm ALGORITHM] [-M SAVE_BOUNDARY_MAP] [--license] [input ...] This program can also be invoked as python3 -m homcloud.cli.pict.binarize_nd.\nALIAS # homcloud-pict-binarize-nd DESCRIPTION # This program computes a persistence diagram from an N-dimensional picture by binarizing it and building a cubical dilation-erosion filtration.\nThe program accepts the following types of file formats: text2d, text_nd, picture2d, pictures3d and npy. If you want to know the details, please see the INPUT FILE FORMAT section below.\nThe input bitmap data is binarized by a given threshold (-t, or --gt/--lt for asymmetric bounds). After that a dilation-erosion filtration is constructed and a persistence diagram is computed and saved as a .pdgm file into OUTPUT.\nIf you want to flip the roles of black pixels and white pixels, please use the -m option.\nBy default the Manhattan distance is used to construct the dilation-erosion filtration. You can use other distances like Euclidean or Chebyshev with the --metric option.\n-C/--cubical switches from the (fast, default) bitmap-based cubical filtration to an explicit cubical complex filtration, which is slower but is required by some downstream tools.\n--mask lets you exclude part of the picture (pixels where the mask is nonzero are treated as an obstacle and are not used when enlarging the binarized region).\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -T TYPE, --type TYPE input data format (text2d,text_nd(default),picture2d,pictures3d,npy) -m MODE, --mode MODE filtration type (black-base|white-base, default is black-base) -t THRESHOLD, --threshold THRESHOLD threshold for binarization (default: 128) --gt GT lower threshold --lt LT upper threshold -o OUTPUT, --output OUTPUT output complex file name -s, --ensmall ensmall binarized picture --metric METRIC metric used to enlarge binarized image (manhattan(default), euclidean, etc.) -C, --cubical use explicit cubical filtration (slow) -p PERIODIC, --periodic PERIODIC periodic (example: 0,1,1 for y and z are periodic) --mask MASK mask bitmap --algorithm ALGORITHM algorithm (dipha, phat-twist, phat-chunk-parallel) -M SAVE_BOUNDARY_MAP, --save-boundary-map SAVE_BOUNDARY_MAP save boundary map (yes/no, default:no) --license show license and exit -M/--save-boundary-map requires -C/--cubical; giving -M on without -C is an error. Saving the boundary map is what makes the output usable later with homcloud-optvol.\nINPUT FILE FORMAT # The program accepts the following types of file formats: text2d, text_nd, picture2d, pictures3d and npy.\ntext2d # 2D pixel (floating point number) values represented by a text as follows:\nx_11 x_12 ... x_1n x_21 x_22 ... x_2n : : : x_m1 x_m2 ... x_mn Each coefficient should be floating point numbers. These values are binarized by the threshold value given by -t option.\ntext_nd # N-dimensional pixel (floating point number) values represented by a text as in the following format:\nFirst line represents the shape of data. For example, if the shape of your data is 200x230x250, first line should be 200 230 250. The following lines are floating point number values in x-fastest direction A line starting with # is skipped as a comment An empty line is also skipped. An example is as follows:\n# 4x3x2 3D voxel data 4 3 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 picture2d # A gray scale PNG or TIFF file.\nIf the input file is 16bit grayscale file, the pixel value is normalized to the range of 0 .. 255.\npictures3d # Gray scale PNG or TIFF files. All picture sizes must be same. If not, an error occurs. All pictures are stacked in the commandline order.\nIf the input file is 16bit grayscale file, the pixel value is normalized to the range of 0 .. 255.\nnpy # Numpy\u0026rsquo;s npy file.\nPlease see https://docs.scipy.org/doc/numpy/neps/npy-format.html for details of this format.\nOUTPUT FORMAT # The program always writes a .pdgm file into OUTPUT (a persistence diagram computed from the dilation-erosion filtration). Old output formats (.complex, .icomplex, .diagram, .idiagram) are no longer supported; giving OUTPUT one of these extensions raises an error.\nNOTES # The old -I/--combine-index-map and -D/--convert-to-diagram options (used when the program produced dipha/idipha complex or diagram files) have been removed: the program always computes and writes a pdgm file directly now.\n","externalUrl":null,"permalink":"/cli-docs/pict_binarize_nd/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # pict.pixel_levelset_nd - Compute a persistence diagram from an N-dimensional picture by using a cubical sublevel/superlevel filtration\nSYNOPSIS # homcloud-pict-pixel-levelset-nd [-h] [-V] [-m MODE] [-T TYPE] [-C] -o OUTPUT [-p PERIODIC] [--algorithm ALGORITHM] [-M SAVE_BOUNDARY_MAP] [--license] [input ...] This program can also be invoked as python3 -m homcloud.cli.pict.pixel_levelset_nd.\nALIAS # homcloud-pict-pixel-levelset-nd DESCRIPTION # This program computes a persistence diagram from a cubical sublevel-set (or superlevel-set) filtration constructed from the given N-dimensional picture data, and writes it as a .pdgm file.\n-m sublevel (the default) filters cells in increasing order of pixel value; -m superlevel filters in decreasing order.\n-C/--cubical switches from the (fast, default) bitmap-based cubical filtration to an explicit cubical complex filtration, which is slower but is required by some downstream tools.\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -m MODE, --mode MODE filtraty type (sublevel(default),superlevel) -T TYPE, --type TYPE input data format (text2d,text_nd(default),picture2d,pictures3d,npy) -C, --cubical Use explicit cubical filtration (slow) -o OUTPUT, --output OUTPUT output file -p PERIODIC, --periodic PERIODIC periodic (example: 0,1,1 for y and z are periodic) --algorithm ALGORITHM algorithm (dipha, phat-twist, phat-chunk-parallel) -M SAVE_BOUNDARY_MAP, --save-boundary-map SAVE_BOUNDARY_MAP save boundary map (yes/no, default:no) --license show license and exit -M/--save-boundary-map requires -C/--cubical; giving -M on without -C is an error. Saving the boundary map is what makes the output usable later with homcloud-optvol.\nINPUT FILE FORMAT # The program accepts the following types of file formats: text2d, text_nd, picture2d, pictures3d and npy.\ntext2d # 2D pixel (floating point number) values represented by a text as follows:\nx_11 x_12 ... x_1n x_21 x_22 ... x_2n : : : x_m1 x_m2 ... x_mn Each coefficient should be floating point numbers.\ntext_nd # N-dimensional pixel (floating point number) values represented by a text as in the following format:\nFirst line represents the shape of data. For example, if the shape of your data is 200x230x250, first line should be 200 230 250. The following lines are floating point number values in x-fastest direction A line starting with # is skipped as a comment An empty line is also skipped. An example is as follows:\n# 4x3x2 3D voxel data 4 3 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 picture2d # A gray scale PNG or TIFF file.\nIf the input file is 16bit grayscale file, the pixel value is normalized to the range of 0 .. 255.\npictures3d # Gray scale PNG or TIFF files. All picture sizes must be same. If not, an error occurs. All pictures are stacked in the commandline order.\nIf the input file is 16bit grayscale file, the pixel value is normalized to the range of 0 .. 255.\nnpy # Numpy\u0026rsquo;s npy file.\nPlease see https://docs.scipy.org/doc/numpy/neps/npy-format.html for details of this format.\nOUTPUT FORMAT # The program always writes a .pdgm file into OUTPUT. Old output formats (.complex, .icomplex, .diagram, .idiagram) are no longer supported; giving OUTPUT one of these extensions raises an error.\nNOTES # The old -I/--combine-index-map and -D/--convert-to-diagram options (used when the program produced dipha/idipha complex or diagram files) have been removed: the program always computes and writes a pdgm file directly now. The old -u/--upper-bound and -l/--lower-bound options documented previously do not exist in the current implementation.\n","externalUrl":null,"permalink":"/cli-docs/pict_pixel_levelset_nd/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # pict.show_volume_2d - Draw optimal-volume pixels on a 2D picture from a merge-tree pdgm file\nSYNOPSIS # homcloud-pict-show-volume-2d [-h] [-V] -d DEGREE [-f FILTER] [-v VECTORIZED_HISTOGRAM_MASK] [-H HISTOINFO] [-B] [-D] [--volume] [--birth-color BIRTH_COLOR] [--death-color DEATH_COLOR] [--volume-color VOLUME_COLOR] [--alpha ALPHA] [-S MARKER_SIZE] [-o OUTPUT] picture diagram This program can also be invoked as python3 -m homcloud.cli.pict.show_volume_2d.\nALIAS # homcloud-pict-show-volume-2d DESCRIPTION # This program draws, on top of a 2D picture, the birth/death pixels and/or the volume pixels of every birth-death pair recorded in a merge-tree .pdgm file produced by homcloud-pict-tree.\npicture is the original picture file, and diagram is a .pdgm file written by homcloud-pict-tree (which stores a bitmap_phtrees chunk for degree 0 and for degree (n-1) of the input picture). -d must be 0 or n-1, matching one of those two degrees.\nNodes whose death time equals their birth time, or whose death time is missing (essential/boundary nodes), are skipped.\n-f/--filter can be given multiple times to select only the nodes that satisfy all of the given predicates, e.g. -f \u0026quot;lifetime \u0026gt; 5.0\u0026quot;. The supported predicate targets are lifetime, birth, and death, and the supported operators are \u0026gt;, \u0026lt;, \u0026gt;=, \u0026lt;=, and ==.\nAlternatively, -v/--vectorized-histogram-mask together with -H/--histoinfo selects nodes by a 0/1 mask vector produced from a vectorized histogram (see homcloud-vectorize-PD); both options must be given together.\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -d DEGREE, --degree DEGREE degree of PH -f FILTER, --filter FILTER filters (ex: \u0026quot;lifetime \u0026gt; 5.0\u0026quot;) -v VECTORIZED_HISTOGRAM_MASK, --vectorized-histogram-mask VECTORIZED_HISTOGRAM_MASK 0-1 vector textfile for mask -H HISTOINFO, --histoinfo HISTOINFO vectorize histogram information (both -v and -H are required) -B, --birth plot birth pixels -D, --death plot death pixels --volume plot volume pixels --birth-color BIRTH_COLOR birth pixel color --death-color DEATH_COLOR death pixel color --volume-color VOLUME_COLOR volume pixels color --alpha ALPHA alpha value for volume pixels -S MARKER_SIZE, --marker-size MARKER_SIZE marker size (default: 1) -o OUTPUT, --output OUTPUT output filername --birth-color, --death-color, and --volume-color accept a color in #rrggbb hex form (e.g. #ff0000). --alpha (default: 0.5) blends --volume-color with the original pixel color for each volume pixel when --volume is given.\nOUTPUT # If -o is given, the annotated picture is saved to that path. If -o is not given, the picture is drawn in memory but not displayed or saved anywhere, so the program effectively does nothing visible; always pass -o in practice.\nEXAMPLE # homcloud-pict-tree -m black-base -t 100 -T picture2d -o tree.pdgm slice.png homcloud-pict-show-volume-2d -d 0 -B -D --volume -f \u0026quot;lifetime \u0026gt; 3.0\u0026quot; -o annotated.png slice.png tree.pdgm ","externalUrl":null,"permalink":"/cli-docs/pict_show_volume_2d/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # pict.slice3d - Shows the sliced images of 3D bitmap data in npy format\nSYNOPSIS # homcloud-pict-slice3d [-h] [-s SLICE] [-S SPACER] [-r RANGE] [--image-viewer IMAGE_VIEWER] input [input ...] This program can also be invoked as python3 -m homcloud.cli.pict.slice3d.\nALIAS # homcloud-pict-slice3d DESCRIPTION # This program shows the sliced images of 3D bitmap data in npy format.\n-s option specifies which axis (0, 1, or 2) is used for slicing.\nYou can see multiple npy data files with the same shape side by side. -S option specifies the number of blank spacer pixels between each sliced image.\n--image-viewer specifies the program name of the image viewer you want (default: eog -n). The viewer should be able to display multiple images in the order of the file paths given on the command line. Some image viewers such as eog and ristretto are good for that purpose.\nOPTIONS # -h, --help show this help message and exit -s SLICE, --slice SLICE slicing direction (0, 1, or 2) (default: 0) -S SPACER, --spacer SPACER spacer pixels (default: 10) -r RANGE, --range RANGE range of slices --image-viewer IMAGE_VIEWER image viewer program name (default: \u0026quot;eog -n\u0026quot;) -r/--range takes the form START:END (plain integers, e.g. 5:20); only slice indices in [START, END) along the slicing axis are rendered. If omitted, all slices are rendered.\nThis command has no -V/--version or --license option, unlike most other homcloud-* commands.\nEXAMPLES # # Sliced along the yz-plane (-s 2), separator is 5 pixels, eog is used as the image viewer homcloud-pict-slice3d -s 2 -S 5 m1.npy m2.npy --image-viewer eog NOTES # All input .npy files should have the same shape. The current implementation\u0026rsquo;s shape check is a no-op bug (it does not actually compare shapes), so mismatched inputs are not rejected and may produce a broken or misleading montage; make sure your inputs share a shape yourself.\n","externalUrl":null,"permalink":"/cli-docs/pict_slice3d/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # pict.to_npy - Convert picture/text data into a numpy .npy file\nSYNOPSIS # homcloud-pict-to-npy [-h] [-V] [-T TYPE] -o OUTPUT [-O OUTPUT_TYPE] [-t THRESHOLD] [--license] [input ...] This program can also be invoked as python3 -m homcloud.cli.pict.to_npy.\nALIAS # homcloud-pict-to-npy DESCRIPTION # This program loads N-dimensional picture data (in any of the input formats accepted by homcloud-pict-binarize-nd) and saves it as a numpy .npy file, optionally converting the data type.\nThis is convenient for pre-converting text2d/text_nd/picture2d/ pictures3d data (which can be slow to parse) into an .npy file that other homcloud-pict-* tools can then load quickly with -T npy, or for use with homcloud-pict-slice3d.\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -T TYPE, --type TYPE input data format (text2d,text_nd(default),picture2d,pictures3d,npy) -o OUTPUT, --output OUTPUT output complex file name -O OUTPUT_TYPE, --output-type OUTPUT_TYPE output data type (float, int, bool) -t THRESHOLD, --threshold THRESHOLD threshold for boolean output --license show license and exit -t/--threshold is required when -O bool is given: each pixel is converted to True if its value is greater than THRESHOLD, else False.\nINPUT FILE FORMAT # Same formats as homcloud-pict-binarize-nd: text2d, text_nd, picture2d, pictures3d, and npy. See that document for the detailed format description.\nOUTPUT FORMAT # A numpy .npy file (written with numpy.save) containing the loaded picture as an array of dtype float, int, or bool according to -O/--output-type.\nEXAMPLES # # Stack a series of PNG slices into a single float32 npy volume homcloud-pict-to-npy -T pictures3d -o volume.npy slice001.png slice002.png slice003.png # Convert text_nd data into a boolean npy mask homcloud-pict-to-npy -T text_nd -O bool -t 128 -o mask.npy data.txt ","externalUrl":null,"permalink":"/cli-docs/pict_to_npy/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # pict.tree - Compute the 0th and (n-1)th persistent-homology merge trees of an N-dimensional picture\nSYNOPSIS # homcloud-pict-tree [-h] [-V] [--license] -m MODE [-t THRESHOLD] [--gt GT] [--lt LT] [-s] [--metric METRIC] [-T TYPE] [-O OUTPUT_TYPE] -o OUTPUT [input ...] This program can also be invoked as python3 -m homcloud.cli.pict.tree.\nALIAS # homcloud-pict-tree DESCRIPTION # This program computes the persistence-diagram merge trees (union-find style \u0026ldquo;PH trees\u0026rdquo;) for the 0th degree and the (n-1)th degree of an N-dimensional picture, in one pass, and writes them to OUTPUT. Merge trees additionally record, for every birth-death pair, which pixels merged into which (via parent/children links and each node\u0026rsquo;s volume), unlike a plain persistence diagram.\n-m selects how the input picture is turned into a filtration before the merge trees are computed:\n-m black-base / -m white-base binarize the picture (same binarization/threshold options as homcloud-pict-binarize-nd, under the \u0026ldquo;for binarize\u0026rdquo; group below) and then build the merge trees from the distance transform of the binarized picture. -m sublevel / -m superlevel build the merge trees directly from the picture\u0026rsquo;s pixel values (same meaning as in homcloud-pict-pixel-levelset-nd), without binarization. OPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit --license show license and exit -m MODE, --mode MODE mode (white-base or black-base for binarize, superlevel or sublevel for levelset) for binarize: -t THRESHOLD, --threshold THRESHOLD threshold for binarization (default: 128) --gt GT lower threshold --lt LT upper threshold -s, --ensmall ensmall binarized picture --metric METRIC metric used to enlarge binarized image (manhattan(default), euclidean, etc.) for input and output: -T TYPE, --type TYPE input data format (text2d, text_nd(default), picture2d, picture3d, npy) -O OUTPUT_TYPE, --output-type OUTPUT_TYPE output file format (json, msgpack, pdgm(default)) -o OUTPUT, --output OUTPUT output file The \u0026ldquo;for binarize\u0026rdquo; options only apply when -m is black-base or white-base; they are ignored for sublevel/superlevel.\nINPUT FILE FORMAT # Same formats as homcloud-pict-binarize-nd: text2d, text_nd, picture2d, picture3d, and npy. See that document for the detailed format description.\nOUTPUT FORMAT # -O pdgm (default) # A .pdgm file (bitmap-tree filtration type) containing:\nthe ordinary persistence-diagram pairs for degree 0 and for degree (n-1), where n is the dimension of the input picture, and\na bitmap_phtrees chunk per degree, readable via homcloud.pdgm_format.PDGMReader, that maps each (non-boundary) merge-tree node id to:\n{ \u0026quot;id\u0026quot;: int, \u0026quot;birth-time\u0026quot;: float, \u0026quot;death-time\u0026quot;: float, \u0026quot;birth-pixel\u0026quot;: pixel or null, \u0026quot;death-pixel\u0026quot;: pixel or null, \u0026quot;volume\u0026quot;: array of pixel, /* all pixels merged into this node */ \u0026quot;parent\u0026quot;: int or null, \u0026quot;children\u0026quot;: array of int } This is the same chunk format that homcloud-pict-show-volume-2d reads to draw volumes.\n-O json / -O msgpack # A JSON (or msgpack-encoded) object:\n{ \u0026quot;dim\u0026quot;: int, /* dimension of the input picture */ \u0026quot;sign-flipped\u0026quot;: bool, /* true when -m superlevel */ \u0026quot;lower\u0026quot;: mergetree, /* degree-0 merge tree */ \u0026quot;upper\u0026quot;: mergetree /* degree-(dim-1) merge tree */ } mergetree: { \u0026quot;degree\u0026quot;: int, \u0026quot;nodes\u0026quot;: { \u0026quot;\u0026lt;node-id\u0026gt;\u0026quot;: node, ... } } node has the same fields as listed in the pdgm case above.\nEXAMPLES # # Binarize a 3D picture (black-base) and compute both merge trees as a pdgm file homcloud-pict-tree -m black-base -t 100 -T picture3d -o tree.pdgm slice*.png # Build merge trees directly from a sublevel filtration of an npy volume, as JSON homcloud-pict-tree -m sublevel -T npy -O json -o tree.json volume.npy ","externalUrl":null,"permalink":"/cli-docs/pict_tree/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # plot_PD - Plot a persistence diagram as a color histogram or contour plot\nSYNOPSIS # homcloud-plot-PD [-h] [-V] -d DEGREE [-T TYPE] [-N] [-p POWER] [-l] [--loglog] [--linear-midpoint LINEAR_MIDPOINT] [-m MAX] [--vmin VMIN] [-c COLORMAP] [-s STYLE] [-t TITLE] [-U UNIT_NAME] [--font-size FONT_SIZE] [--aspect ASPECT] [--plot-essential] [-D SCATTERING_SIZE] [-o OUTPUT] [-x X_RANGE] [-X XBINS] [-y Y_RANGE] [-Y YBINS] [-n NORMALIZE_CONSTANT] [-M MARKER] [--dpi DPI] [--tight-layout] INPUT [INPUT ...] This program can also be invoked as python3 -m homcloud.cli.plot_PD.\nALIAS # homcloud-plot-PD DESCRIPTION # This program plots a persistence diagram given by INPUT as a 2D histogram (color histogram by default, or a contour plot).\nYou can control the histogram binning with the -x/-X (birth axis) and -y/-Y (death axis) options. If they are not given, the range and number of bins are chosen automatically.\nYou can use multiple input files. In that case, all pairs from all files are merged into one diagram before plotting.\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -d DEGREE, --degree DEGREE degree of PH -T TYPE, --type TYPE input file format (pdgm, text) (default: autodetect) -N, --negate flip the sign of birth/death times for superlevel persistence (default: False) -p POWER, --power POWER Output x^POWER for each value x -l, --log Output log(x+1) for each value x --loglog Output log(log(x+1)+1) --linear-midpoint LINEAR_MIDPOINT linear with midpoint -m MAX, --vmax MAX Maximum of colorbar (default: autoscale) --vmin VMIN Minimum of colorbar -c COLORMAP, --colormap COLORMAP matplotlib colormap name -s STYLE, --style STYLE plotting style (colorhistogram(default), contour) -t TITLE, --title TITLE title string -U UNIT_NAME, --unit-name UNIT_NAME The unit name of birth and death times --font-size FONT_SIZE font size (default: 12) --aspect ASPECT histogram aspect (default: auto) --plot-essential whether to plot essential values (default: False) -D SCATTERING_SIZE, --diffuse-pairs SCATTERING_SIZE Diffuse pairs using gaussian distribution of SD=SIGMA -o OUTPUT, --output OUTPUT output file -x X_RANGE, --x-range X_RANGE birth range -X XBINS, --xbins XBINS number of bins in birth-axis -y Y_RANGE, --y-range Y_RANGE death range -Y YBINS, --ybins YBINS number of bins in death-axis -n NORMALIZE_CONSTANT, --normalize-constant NORMALIZE_CONSTANT normalize constant to histogram height -M MARKER, --marker MARKER marker file --dpi DPI output DPI (used with -o option, default is savefig.dpi for matplotlib) --tight-layout use tight layout (adjusting layout) INPUT FORMAT # A .pdgm file, or a text file of birth-death pairs (one pair per line, -d is ignored in that case):\nbirth1 death1 birth2 death2 : -T selects the format explicitly; by default it is auto-detected from the file content/extension.\nOUTPUT FORMAT # If the output argument is not given, the plotted picture is shown in your display. If the output argument is given, the output format is determined by its extension. You can output the picture in PNG (.png), PDF (.pdf), and EPS (.eps). Other formats are also available if matplotlib supports them.\n","externalUrl":null,"permalink":"/cli-docs/plot_pd/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # plot_PD_slice - Plot the 1d slice of a PD histogram\nSYNOPSIS # homcloud-plot-PD-slice [-h] [-V] -d DEGREE [-T TYPE] [-N] [-l LEFT_LABEL] [-r RIGHT_LABEL] [-b BINS] [--log] [-o OUTPUT] [--text-output] [-t TITLE] [--dpi DPI] birth1 death1 birth2 death2 width input [input ...] This program can also be invoked as python3 -m homcloud.cli.plot_PD_slice.\nALIAS # homcloud-plot-PD-slice DESCRIPTION # This program plots the 1d slice of a PD histogram.\nThe program takes the slice on a segment from (birth1, death1) to (birth2, death2). Points on the segment strip whose width is width are counted to construct the 1d histogram.\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -d DEGREE, --degree DEGREE degree of PH -T TYPE, --type TYPE input file format (pdgm, text) (default: autodetect) -N, --negate flip the sign of birth/death times for superlevel persistence (default: False) -l LEFT_LABEL, --left-label LEFT_LABEL label for starting point -r RIGHT_LABEL, --right-label RIGHT_LABEL label for end point -b BINS, --bins BINS number of bins --log log scale -o OUTPUT, --output OUTPUT output file path --text-output output histgram data into a text file -t TITLE, --title TITLE title --dpi DPI output dpi positional arguments:\nbirth1 birth of starting point death1 death of starting point birth2 birth of end point death2 death of end point width width for histogram input input file path INPUT FORMAT # You can use the same data format as plot_PD for an input file: a .pdgm file, or a text file of birth-death pairs (-T selects the format explicitly; by default it is auto-detected).\nIf multiple input files are specified, all birth-death pairs in the input files are counted together.\nOUTPUT # If -o option is not given, the histogram is shown in your window. If -o option is given, the output is written to that path. By default it is a figure whose format is determined by the file extension (PNG(.png), PDF(.pdf), etc. — anything matplotlib supports). If --text-output is also given, the raw histogram counts are written as a text file instead (one integer count per line) rather than being plotted.\n","externalUrl":null,"permalink":"/cli-docs/plot_pd_slice/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # rips - Compute a persistence diagram from a Vietoris-Rips filtration of a distance matrix\nSYNOPSIS # homcloud-rips [-h] [-V] -d UPPER_DEGREE [-u UPPER_VALUE] [--vertex-symbols VERTEX_SYMBOLS] [-M SAVE_BOUNDARY_MAP] [--algorithm ALGORITHM] [--parallels PARALLELS] [--license] input output This program can also be invoked as python3 -m homcloud.cli.rips.\nALIAS # homcloud-rips DESCRIPTION # This program computes a persistence diagram from the Vietoris-Rips filtration of a full distance matrix, and writes it as a .pdgm file.\n-M off (the default) uses ripser internally, which is fast but does not record the boundary map (so the output cannot be used with homcloud-optvol). -M on instead builds the simplicial complex explicitly and reduces its boundary matrix with PHAT, which is slower and uses much more memory for the same UPPER_DEGREE/UPPER_VALUE, but the output can then be used with homcloud-optvol.\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -d UPPER_DEGREE, --upper-degree UPPER_DEGREE Maximum computed degree -u UPPER_VALUE, --upper-value UPPER_VALUE Maximum distance (default: +inf) --vertex-symbols VERTEX_SYMBOLS vertex symbols file -M SAVE_BOUNDARY_MAP, --save-boundary-map SAVE_BOUNDARY_MAP save boundary map into output file(only available with phat-* algorithms, on/*off*) --algorithm ALGORITHM algorithm (ripser) --parallels PARALLELS number of threads (default: 1) --license show license and exit --algorithm only accepts ripser (or is left unset) when -M is off. When -M on is given, --algorithm instead selects the PHAT reduction algorithm (e.g. phat-twist, phat-chunk-parallel), the same as for homcloud-pc-alpha.\nINPUT FILE FORMAT # input is a plain-text n×n distance matrix (loaded with numpy.loadtxt), i.e. n whitespace-separated rows of n numbers, where entry (i, j) is the distance between point i and point j. The matrix should be symmetric with a zero diagonal.\n--vertex-symbols optionally names a text file with one symbol (name) per line, one line per point, in the same order as the distance matrix rows; these symbols are used for -s yes output of homcloud-dump-diagram and in optimal-volume output.\nOUTPUT FORMAT # output is always a .pdgm file (rips filtration type when -M is off, simplicial filtration type when -M is on).\nNOTES # --parallels is accepted by the argument parser but is currently not actually used by the implementation (it is not passed through to the underlying computation); it has no effect regardless of the value given.\n","externalUrl":null,"permalink":"/cli-docs/rips/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # vectorize_PD - Vectorize a persistence diagram using a persistence image\nSYNOPSIS # homcloud-vectorize-PD [-h] [-V] -d DEGREE [-T TYPE] [-N] [-x X_RANGE] [-X XBINS] [-y Y_RANGE] [-Y YBINS] -D GAUSSIAN_SD [-C C] [-p P] [-c COORDINATES] [-H HISTOGRAM_INFORMATION] [-o OUTPUT] [-w WEIGHT_TYPE] [--reorder-process] input This program can also be invoked as python3 -m homcloud.cli.vectorize_PD.\nALIAS # homcloud-vectorize-PD DESCRIPTION # This program vectorizes a persistence diagram using a persistence image: the birth-death pairs are binned into a 2D histogram, a weight function is applied, and the histogram is smoothed by a Gaussian filter. The result is flattened to a fixed-length vector.\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -d DEGREE, --degree DEGREE degree of PH -T TYPE, --type TYPE input file format (pdgm, text) (default: autodetect) -N, --negate flip the sign of birth/death times for superlevel persistence (default: False) -x X_RANGE, --x-range X_RANGE birth range -X XBINS, --xbins XBINS number of bins in birth-axis -y Y_RANGE, --y-range Y_RANGE death range -Y YBINS, --ybins YBINS number of bins in death-axis -D GAUSSIAN_SD, --gaussian-sd GAUSSIAN_SD standard deviation of gaussian diffusion -C C weight constant C -p P weight constant p -c COORDINATES, --coordinates COORDINATES file to write coordinates -H HISTOGRAM_INFORMATION, --histogram-information HISTOGRAM_INFORMATION file to write histogram information -o OUTPUT, --output OUTPUT output file -w WEIGHT_TYPE, --weight-type WEIGHT_TYPE weight type (atan(default),linear,none) --reorder-process apply the gaussian filter before the weight function instead of after (default: weight then gaussian) -C is required when -w atan (the default weight type) is used.\nOUTPUT FORMAT # Output data is a k-dimensional vector, written as a text file with k lines, one real number per line (via numpy.savetxt). If -o is not given, the vector is written to stdout.\nIf -c/--coordinates is given, the bin-center coordinates corresponding to each vector element are written to that file (also via numpy.savetxt).\nIf -H/--histogram-information is given, a JSON file describing the histogram binning (x-edges, y-edges, x-indices, y-indices, sign-flipped) is written. This file is required later by homcloud-view-vectorized-PD and homcloud-pict-show-volume-2d to reconstruct/interpret the vectorized histogram.\n","externalUrl":null,"permalink":"/cli-docs/vectorize_pd/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # view_index_pict \u0026ndash; Draw birth and death pixels for 2D cubical/bitmap filtrations created from digital pictures\nSYNOPSIS # homcloud-view-index-pict [-h] [-V] -d DEGREE [-f FILTER] [-v VECTORIZED_HISTOGRAM_MASK] [-H HISTOINFO] [-B] [-D] [-L] [-s SCALE] [-M MARKER_TYPE] [-S MARKER_SIZE] [--show-command SHOW_COMMAND] [--no-label] [--birth-color BIRTH_COLOR] [--death-color DEATH_COLOR] [--line-color LINE_COLOR] [-o OUTPUT] picture diagram This program can also be invoked as python3 -m homcloud.cli.view_index_pict.\nALIAS # homcloud-view-index-pict DESCRIPTION # Draws birth and death pixels for 2D cubical/bitmap filtrations created from digital pictures onto the original picture.\nYou need to specify two files, picture and diagram: picture is the original picture file, and diagram is a .pdgm file produced with the boundary map saved (-M on), for example by homcloud-pict-binarize-nd or homcloud-pict-pixel-levelset-nd.\n-f/--filter can be given multiple times to select only the birth-death pairs that satisfy all of the given predicates, e.g. -f \u0026quot;lifetime \u0026gt; 5.0\u0026quot;. The supported predicate targets are lifetime, birth, and death, and the supported operators are \u0026gt;, \u0026lt;, \u0026gt;=, \u0026lt;=, and ==.\nAlternatively, -v/--vectorized-histogram-mask together with -H/--histoinfo selects pairs by a 0/1 mask vector produced from a vectorized histogram (see homcloud-vectorize-PD); both options must be given together.\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -d DEGREE, --degree DEGREE degree of PH -f FILTER, --filter FILTER filters (ex: \u0026quot;lifetime \u0026gt; 5.0\u0026quot;) -v VECTORIZED_HISTOGRAM_MASK, --vectorized-histogram-mask VECTORIZED_HISTOGRAM_MASK 0-1 vector textfile for mask -H HISTOINFO, --histoinfo HISTOINFO vectorize histogram information (both -v and -H are required) -B, --birth plot birth pixels -D, --death plot death pixels -L, --line draw line between death and birth pixels -s SCALE, --scale SCALE image scaling factor (1, 3, 5, ...) -M MARKER_TYPE, --marker-type MARKER_TYPE marker type (point, filled-diamond(default), square, filled-square, circle, filled-circle) -S MARKER_SIZE, --marker-size MARKER_SIZE marker size (default: 1) --show-command SHOW_COMMAND image display command --no-label birth-death labels are not drawn --birth-color BIRTH_COLOR birth pixel color --death-color DEATH_COLOR death pixel color --line-color LINE_COLOR birth-death line color -o OUTPUT, --output OUTPUT output filername --birth-color, --death-color, and --line-color accept a color in #rrggbb hex form (e.g. #ff0000).\nOUTPUT # If -o is given, the annotated picture is saved to that path. Otherwise it is written to a temporary PNG file and opened with the program named by --show-command (default: eog).\nNOTES # The old -T/--type and -N/--negate options (for dipha/idipha diagram files) no longer exist; the input diagram must now be a .pdgm file.\n","externalUrl":null,"permalink":"/cli-docs/view_index_pict/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":" NAME # view_vectorized_PD - Plot a vectorized PD in the histogram style\nSYNOPSIS # homcloud-view-vectorized-PD [-h] [-V] [-o OUTPUT] [-p POWER] [-l] [--loglog] [--linear-midpoint LINEAR_MIDPOINT] [-m MAX] [--vmin VMIN] [-c COLORMAP] [-s STYLE] [-t TITLE] [-U UNIT_NAME] [--font-size FONT_SIZE] [--aspect ASPECT] [--plot-essential] [--dpi DPI] input vectorization_info This program can also be invoked as python3 -m homcloud.cli.view_vectorized_PD.\nALIAS # homcloud-view-vectorized-PD DESCRIPTION # This program reconstructs and plots the vectorized PD (persistence image) generated by vectorize_PD, in the same histogram style as plot_PD.\ninput is a vector text file (as written by -o of homcloud-vectorize-PD), and vectorization_info is the JSON file written by the -H/--histogram-information option of homcloud-vectorize-PD.\nOPTIONS # -h, --help show this help message and exit -V, --version show program's version number and exit -o OUTPUT, --output OUTPUT output image file -p POWER, --power POWER Output x^POWER for each value x -l, --log Output log(x+1) for each value x --loglog Output log(log(x+1)+1) --linear-midpoint LINEAR_MIDPOINT linear with midpoint -m MAX, --vmax MAX Maximum of colorbar (default: autoscale) --vmin VMIN Minimum of colorbar -c COLORMAP, --colormap COLORMAP matplotlib colormap name -s STYLE, --style STYLE plotting style (colorhistogram(default), contour) -t TITLE, --title TITLE title string -U UNIT_NAME, --unit-name UNIT_NAME The unit name of birth and death times --font-size FONT_SIZE font size (default: 12) --aspect ASPECT histogram aspect (default: auto) --plot-essential whether to plot essential values (default: False) --dpi DPI output DPI (used with -o option, default is savefig.dpi for matplotlib) If the output argument (-o) is not given, the plotted picture is shown in your display; otherwise it is saved with the format chosen from the file extension (PNG, PDF, EPS, \u0026hellip;).\nEXAMPLE # homcloud-vectorize-PD -d 0 -x \u0026quot;[-20.25:20.25]\u0026quot; -X 81 -D 0.5 -C 6 -p 4 -H histoinfo.json -o vect.txt data.pdgm # do some statistical processing # v.txt is created by the processing # View v.txt homcloud-view-vectorized-PD v.txt histoinfo.json ","externalUrl":null,"permalink":"/cli-docs/view_vectorized_pd/","section":"HomCloud Command Line Interface Documents","summary":"","title":"","type":"cli-docs"},{"content":"This page shows 3D figures for the paper \u0026ldquo;Persistent homology analysis with nonnegative matrixfactorization for 3D voxel data of iron ore sinters\u0026rdquo;. You can zoom, pan, and rotate the figures on your browser.\nFig 3(a) Fig 3(b) Fig 3(c) Fig 3(d) Fig 3(e) Fig 3(f) Fig 3(g) The above figures are generated by Google Colab, Colab\u0026rsquo;s notebook.\n","externalUrl":null,"permalink":"/misc/ph-nmf-figures/","section":"Miscs","summary":"","title":"3D figures for \"Persistent homology analysis with nonnegative matrixfactorization for 3D voxel data of iron ore sinters\"","type":"misc"},{"content":"ここでは Homebrew を用いたインストールを紹介します。 Homebrewはコマンドラインインターフェースを用いてMacにさまざまなソフトウェアをインストールできるツールです． HomebrewでインストールしたPythonから，venvというPython用計量仮想環境を作るツールを利用することでHomCloudをインストールします． venvを利用することでHomCloudが使っているソフトウェアコンポーネントやHomCloud自体のバージョンアップへの対応が簡単になります．\n1. Homebrewのインストール # Homebrewのウェウブサイトを見てインストールします．リンク先のページに書いているように，\n/bin/bash -c \u0026quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\u0026quot; でインストールできます．\n2. Homebrewでパッケージをインストールする # 次のようにしてPythonとCGALをインストールします．\nbrew install python cgal 最新のPython (3.13)では動かない場合があるのでその場合は以下のようにして 3.12 をインストールしてください。\nbrew install python@3.12 cgal 3. venvで仮想環境を作る # 作業用のディレクトリを作ります．homcloudという名前にしましょう．\nmkdir homcloud 作業用ディレクトリ内でvenvの設定を作ります．\ncd homcloud python3 -m venv venv venvというディレクトリが作られ，その下に仮想環境に必要なファイルがコピーされます．3.12を使う場合は代わりに次のようにします。\ncd homcloud python3.12 -m venv venv 4. 仮想環境に入る # このディレクトリで次のようにして仮想環境に入ります．これはターミナル（シェル）を起動するたびに必要となります．\nsource ./venv/bin/activate 5. pipでインストール # 以下のようにタイプして必要なPythonパッケージをインストールします．\npip install numpy wheel jupyter Cython \u0026quot;pyvista[all]\u0026quot; pyqt6 pyvistaqt 6. HomCloudのインストール # HomCloudをインストールします．ターミナルで次のようにタイプします．\nCPLUS_INCLUDE_PATH=/opt/homebrew/include LIBRARY_PATH=/opt/homebrew/lib pip install homcloud 7. 自己テストプログラム # 最後に正常にインストールされているかどうかを調べるためにターミナルで以下のように実行します．\npython -m homcloud.self_check --pyvista 以下のような画像が表示されたウィンドウが開かれます． 開かれたウィンドウは閉じてください．\n最終的にコマンドプロンプトに以下のように表示されていたらOKです(バージョンの値は違っていてかまいません)．\nHomCloud version: 4.0.0a4 Python version: 3.11.2 (main, Mar 24 2023, 00:16:47) [Clang 14.0.0 (clang-1400.0.29.202)] Alpha Shape 3 ... ok Alpha Shape 3 with weights ... ok Periodic Alpha Shape 3 with weights ... ok Alpha Shape 2 ... ok Grayscale 2D bitmap ... ok Binary 2D bitmap ... ok Binary 2D periodic bitmap ... ok Rips filtration ... ok Plotting PD ... ok Optimal Volume ... ok PyVista 3D drawing (close the pop-up window)... ok 以上でインストールは完了です．\n8. チュートリアルの実施 # HomCloudのチュートリアルを動かしてみましょう． チュートリアルのページからzipファイルからダウンロードしてhomcloudフォルダに展開してください。 その後，venvの仮想環境に入って\njupyter notebook とするとブラウザがポップアップし，jupyter notebookが起動します． ここでチュートリアルのフォルダからチュートリアルを始めてください． いくつかチュートリアルがありますが，pointcloudが一番やりやすいでしょう．\nトラブルシューティング # Xcodeの問題 # 「5. pipでインストール」の所で次のようなエラーが出た場合は，普通のXcodeが利用させる設定になっています． HomebrewではXcodeのCommand Line Toolsを使う前提になっているため，Command Line Toolsに切り替える必要があります．\n/Applications/Xcode-14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:610:45: error: unknown type name 'nullptr_t' operator!=(const unique_ptr\u0026lt;_T1, _D1\u0026gt;\u0026amp; __x, nullptr_t) _NOEXCEPT ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 220 warnings and 20 errors generated. error: command '/usr/bin/clang' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for ripser Building wheel for hopcroftkarp (setup.py) ... done Created wheel for hopcroftkarp: filename=hopcroftkarp-1.2.5-py2.py3-none-any.whl size=18102 sha256=90695ae1fb96c91e6da1391bc7a75635e2c8011d9b19f41ad5fb496d9ce34716 Stored in directory: /Users/distiller/Library/Caches/pip/wheels/1f/cc/2d/de23a8b9ae586817b0b44de4a4b1a08f23473e248a644b312f Successfully built msgpack-python hopcroftkarp Failed to build ripser ERROR: Could not build wheels for ripser, which is required to install pyproject.toml-based projects Exited with code exit status 1 切り替えは次のようにします．\nsudo xcode-select -s /Library/Developer/CommandLineTools/ ","externalUrl":null,"permalink":"/install-guide/install_guide_for_m1mac/","section":"HomCloud Install Guide","summary":"","title":"Apple Silicon (M1) Mac へのインストール","type":"install-guide"},{"content":"","externalUrl":null,"permalink":"/authors/","section":"Authors","summary":"","title":"Authors","type":"authors"},{"content":"","externalUrl":null,"permalink":"/categories/","section":"Categories","summary":"","title":"Categories","type":"categories"},{"content":"HomCloud用Dockerイメージがdockerhubから利用可能です。 この文書ではこのDockerイメージを利用したHomCloudの利用法について説明します。\nDockerについて # Dockerはコンテナ型の仮想環境を作成、配布、実行するためのプラットフォームです。 特に配布に関する利便性がDockerの人気の鍵となっています。 Dockerの使い方等についてはDockerの公式のドキュメントや各種解説などを参考にして身に付けてください。 以下の解説ではDockerは既にインストール済であるとして説明をします。\n1. Dockerイメージの取得 # https://hub.docker.com/r/ohai9/homcloud/tags から適当なイメージを選んで pull してください。 このガイドでは 4.4.1-python3.12.2-slim-bookworm (HomCloudのバージョン4.4.1で，pythonのバージョンが3.12.2のものです)を使いましょう。 以下のようにします。\ndocker pull ohai9/homcloud:4.4.1-python3.12.2-slim-bookworm 2. イメージの起動テスト # シェルから以下のように入力して動作テストをします。\ndocker run -it ohai9/homcloud:4.4.1-python3.12.2-slim-bookworm /usr/local/bin/python3 -m homcloud.self_check 以下のような出力が得られればOKです。\nHomCloud version: 4.4.1 Python version: 3.12.2 (main, Mar 12 2024, 11:13:18) [GCC 12.2.0] CGAL version: 5.6.1 (1050611000) Alpha Shape 3 ... ok Alpha Shape 3 with weights ... ok Periodic Alpha Shape 3 with weights ... ok Alpha Shape 2 ... ok Grayscale 2D bitmap ... ok Binary 2D bitmap ... ok Binary 2D periodic bitmap ... ok Rips filtration ... ok Plotting PD ... ok Optimal Volume ... ok 3. Jupyter labの起動 # それではDocker内でJupyter Labを起動します。シェルから以下のように入力します。\ndocker run -p \u0026quot;127.0.0.1:8888:8888\u0026quot; -it ohai9/homcloud:4.4.1-python3.12.2-slim-bookworm /usr/local/bin/start-jupyterlab.sh 以下のような出力が得られるはずです(細かい出力は異っていてかまいません)。\n[I 2024-03-27 17:22:36.766 ServerApp] jupyter_lsp | extension was successfully linked. [I 2024-03-27 17:22:36.766 ServerApp] jupyter_server_proxy | extension was successfully linked. : : [I 2024-03-27 17:22:37.041 ServerApp] http://127.0.0.1:8888/lab [I 2024-03-27 17:22:37.041 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [I 2024-03-27 17:22:37.053 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server そこで http://127.0.0.1:8888/lab にアクセスするとHomCloudが動くJupyterLab環境にアクセスできます。\n","externalUrl":null,"permalink":"/install-guide/install_guide_for_docker/","section":"HomCloud Install Guide","summary":"","title":"Docker を使って HomCloud を利用する","type":"install-guide"},{"content":"Go to Google Drive.\n","externalUrl":null,"permalink":"/download-links/","section":"HomCloud","summary":"","title":"Download HomCloud","type":"page"},{"content":"HomCloud はパーシステントホモロジー(persistent homology)にもとづいたデータ解析ソフトウェアです． 大林が中心となって開発しています．\nダウンロード # pypiからダウンロードできます。 通常はpipやuvのようなツールを用いてインストールできます。\n最新版のREADME 最新版のNEWS 最新版のLICENSE 古いバージョンは Google Drive よりダウンロードできます。\nドキュメント # インストール チュートリアル FAQ Python API reference manual トポロジカルデータ解析コミュニティ # 材料科学と位相的データ解析の組み合わせに関する情報共有，発信の場として トポロジカルデータ解析コミュニティが活動をしています． HomCloudのチュートリアルなどもやっていますので，材料科学データの解析にHomCloudを使いたい，という方は 参加するとよいでしょう．\nライセンス # HomCloud は GPL 3 もしくは任意のそれ以降のバージョンで配布しています。 詳しくは LICENSE をご覧ください。 また、GPL version 3について 詳しくは https://www.gnu.org/licenses/gpl-3.0.ja.html をご覧ください。\n論文でHomCloudを参照する方法 # HomCloudの日本語解説論文もしくは 英語での解説論文を参考文献に入れてください． このサイトのURL (https://homcloud.dev/en/) も加えると良いでしょう。 HomCloudのバージョンを明記しておくと解析を自分で試してみたい読者に便利でしょう。\n開発者 # 大林一平 (中心的開発者) 和田 智秀 (Window版やドキュメント整備など) 田暾華 (チュートリアルの整備やデバッグ，機能追加など) 一部株式会社TNTに外注で頼んでいます 中島健 (チュートリアルの翻訳) 宮永 潤 (日本語ドキュメント整備) 平岡研究室の皆様 ","externalUrl":null,"permalink":"/","section":"HomCloud","summary":"","title":"HomCloud","type":"page"},{"content":" Q. Numpy 2 への対応状況はどうでしょうか # 対応は完了しています。\nQ. PDをログスケール表示でプロットしようとすると，「ValueError: Data has no positive values, and therefore can not be log-scaled.」というメッセージがでて何も表示されない． # A. プロット範囲にデータがありません． # 考えられる可能性としては，\nそもそもbirth-death pairが1つもない プロット範囲がずれている の2つがあります．というわけでまずはbirth time，death timeの値を確認してください．2つ目の場合はプロット範囲を調整してください．\nQ. 結晶データを解析するとエラーがでます # A. データに小さな乱数を加えてください． # データが\n3点が同一直線上に並んでいる 4点が同一平面上に並んでいる 5点が同一球面上に並んでいる 場合などには，計算時にエラーが出たり，奇妙な結果(例えば対角線の下にbirth-death pairが現われるなど)になったりします． この場合入力の頂点座標の値に小さな乱数を加えると回避できます．\n数学的にこの小さな乱数は結果にほとんど影響を与えないことが保証されている(詳しくはPHの安定性定理を調べてみてくださ)ので，安心して小さな乱数を加えてください．\nQ. sshで接続したターミナルにInvalid DISPLAY VARIABLEと表示され実行できない # matplotlibがGUIを使おうとしてエラーが発生しています．回避策として「GUIをオフにする」「X forwardingを設定する」の2つがあります．\nA1. GUI表示をオフにする # matplotlibを使用時に、お使いの環境でGUI表示が使えない状況であるため、このエラーが出ていると考えられます。 matplotrcの環境設定でGUIをオフにすることで回避できます。$HOME/.config/matplotlib/matplotlibrcに以下の内容を追加します．\nbackend: agg もしくはプログラム上で\nimport matplotlib matplotlib.rcParams['backend'] = \u0026quot;Agg\u0026quot; のようにするのも可能です． より詳細な情報はMatplotlibのドキュメントを参考にしてください。\nA2. X forwardingの設定を行い，ウィンドウが表示されるようにする # matplotlibによるグラフの表示や、新規にXwindowでグラフを表示する場合など、クライアント側にウィンドウ表示の設定がされていない場合はグラフを表示するプログラムでエラーが出ます。\nWindowsの場合、teratermやPuttyなどでログインしている場合は以下にあるXウィンドウ表示ためのプログラムをインストールし、 X11 forwarding の設定を適宜行ってください。\nXming: https://ja.osdn.net/projects/sfnet_xming/releases/ VcXsrv: https://sourceforge.net/projects/vcxsrv/ Macの場合は ssh でログインするときに\nssh -X server ssh -Y server として -X か -Y のオプションをつけてください。\nQ. ParaView のインターフェースはどうなりましたか？ # チュートリアルからParaViewへの言及がなくなりました． ParaViewインターフェースはどうなったのですか？\nA. ParaViewインターフェースは廃止予定です。 # ParaViewインターフェースはHomCloud 4.xでも利用可能です． ParaViewによる3次元可視化機能はしばらくこのまま維持する予定です．\nしかし，HomCloudはParaViewのバージョンアップについていけていません． HomCloudはParaViewのPython APIを使っていますが，このAPIはあまり安定しておらず，ドキュメントも不足しています． そのためサポートには消極的です． 新しいバージョンへのParaViewへの対応などは優先順位が低いです． HomCloudのParaViewサポートは徐々にフェードアウトさせる予定です．\nPyVistaによるインターフェースが代わりに利用可能です． Pythonでコードを書いてParaView的な3次元可視化ができます．\nQ. Dockerで動かない # A. root以外で動作させる，もしくはOpenMPIの設定を変える # HomCloudは内部的にOpenMPIを使っています．そしてOpenMPIはrootではデフォルトでは 動作拒否をします．一方一般的にDockerでは内部的にrootで動かしていることが多いです． そのためDockerではエラーが発生して止まります．\n対応策は以下のいずれかです．\nroot以外のユーザを使う．詳しくはDockerのドキュメントなどを見てください．\nOpenMPIにDockerでの動作を許容させる．OpenMPIのバージョンに依存しますが，以下の2つの環境変数を1に指定するとROOTでも動作します．\nOMPI_ALLOW_RUN_AS_ROOT OMPI_ALLOW_RUN_AS_ROOT_CONFIRM Q. PyQt のインストールで問題が生じる # pip install pyqt5とすると次のようなエラーがでる．\nCollecting pyqt5 Installing build dependencies ... done Complete output from command python setup.py egg_info: Traceback (most recent call last): File \u0026quot;\u0026lt;string\u0026gt;\u0026quot;, line 1, in \u0026lt;module\u0026gt; File \u0026quot;/usr/lib/python3.7/tokenize.py\u0026quot;, line 447, in open buffer = _builtin_open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-bvg6_fyh/pyqt5/setup.py' ---------------------------------------- Command \u0026quot;python setup.py egg_info\u0026quot; failed with error code 1 in /tmp/pip-install-bvg6_fyh/pyqt5/ A. PyQtの特定のバージョンの問題なので，問題ないバージョンを指定します # pip install pyqt5の代わりにpip3 install pyqt5==5.14としてください．\nQ. 3次元可視化が遅い # もっと高速に動かしたい．特に3次元ボクセルデータの描画がするまでが遅い．\nA. PyVista インターフェースで別ウィンドウで動かすのが一番高速 # 次のように pyvista.Plotter に notebook=False を渡すと，Jupyter notebook の inline ではなく別のウィンドウで描画されます． これが現状では一番高速のようです．\nimport pyvsta as pv pl = pv.Plotter(notebook=False) pl.add_mesh(...) pl.show() デフォルトで別ウィンドウで描画したい場合は次のコードをJupyter notebookで実行するとデフォルトの挙動が変化します．\nimport pyvsta as pv pv.global_theme.notebook = False Q. ポイントクラウドデータ解析で，異なる半径を持つ粒子を解析したい． # A. homcloud.interface.PDList.from_alpha_filtration の weight パラメータに半径の二乗を渡す # homcloud.interface.PDList.from_alpha_filtrationのweightパラメータを使うと各粒子の初期半径を指定できます． 初期半径の二乗を渡してください．詳しくはリファレンスマニュアルのfrom_alpha_filtrationの項を参考にしてください．\nQ. 3次元のグレイスケール画像は解析できる？ # チュートリアルには3次元白黒画像と2次元グレイスケール画像の例しかないのですが，3次元のグレイスケール画像は解析できますか？\nA. できます # チュートリアルは準備されていませんが可能です． 解析法については2次元グレイスケール画像のチュートリアルを，可視化については3次元白黒画像のチュートリアルを，それぞれ参考にしてください．\nQ. HomCloud は商用利用可能か？ # A. HomCloudはGPL3ライセンスの下で配布されており，その範囲で利用可能です # HomCloud は GPL 3 で配布されており，使用は常に自由です． データ分析をするのであれば特に制約はありません。\nHomCloudを組み込んだソフトウェアを配布する場合には，GPL3に従わなければなりません． 詳しくはライセンスを読んでください． またあなたの所属する組織の法務部に相談してください．\nQ. Linux / Windows / Mac はどれも使えるようですがどれがお勧めですか？ # A. Linux \u0026gt; Windows \u0026gt; Mac の順です． # どれでもそれなりにちゃんと動きますが，開発者がLinuxをメインで使っているのでこれが一番確実に動作します． またエラー報告があったときにLinuxが一番対応が早いです． Linux以外は後回しになります．\nWindowsとMacだとWindowsのほうが動作の確実度は高い気がします． MacはIntel Macはフェイドアウト最中なので積極的に対応する予定はありませんのでApple Silicon Macのほうがよいでしょう．\n","externalUrl":null,"permalink":"/faq/","section":"HomCloud","summary":"","title":"HomCloud - よくある質問と解答","type":"page"},{"content":"The authors of HomCloud recommend Python interface instead of CLI interface.\nhomcloud-abstract-filtration homcloud-dump-diagram homcloud-optvol homcloud-pc-alpha homcloud-phtrees homcloud-pict-binarize-nd homcloud-pict-pixel-levelset-nd homcloud-pict-show-volume-2d homcloud-pict-slice3d homcloud-pict-to-npy homcloud-pict-tree homcloud-plot-PD homcloud-plot-PD-slice homcloud-rips homcloud-vectorize-PD homcloud-view-index_pict homcloud-view-vectorized-PD ","externalUrl":null,"permalink":"/cli-docs/","section":"HomCloud Command Line Interface Documents","summary":"","title":"HomCloud Command Line Interface Documents","type":"cli-docs"},{"content":" お勧めのインストール方法 # OS 方法 OSのバージョンなど Ubuntu/Debian venvを使いpipでインストール Ubuntu 26.04 LTSで確認 OS X (Apple Silicon Mac) M1 Macへのインストール macOS Tahoe 26で確認 Windows 直接各パッケージインストール または WSL 上のインストール Windows 11で確認 その他のインストール方法 # OS 方法 OSのバージョンなど Docker HomCloudのDockerイメージを利用する Ubuntu/Debian apt-get、pipによるインストール アップグレード # pipでHomCloudをインストールした場合は次のようにしてアップグレードできます．\npip install -U homcloud ","externalUrl":null,"permalink":"/install-guide/","section":"HomCloud Install Guide","summary":"","title":"HomCloud Install Guide","type":"install-guide"},{"content":"List of use cases of HomCloud\nBy our research group and collabolators # Materials science\nEmi Minamitani, Takenobu Nakamura, Ippei Obayashi \u0026amp; Hideyuki Mizuno. Persistent homology elucidates hierarchical structures responsible for mechanical properties in covalent amorphous solids. Nature Communications 16, Article number: 8226 (2025). https://doi.org/10.1038/s41467-025-63424-z\nMichiki Taniwaki, Ryunosuke Nagaoka, Ken Masuzawa, Shunsuke Sato, Alexandre Lira Foggiatto, Chiharu Mitsumata, Takahiro Yamazaki, Ippei Obayashi, Yasuaki Hiraoka, Yasuhiko Igarashi, Yuta Mizutori, Sepehri Amin Hossein, Tadakatsu Ohkubo, Hisashi Mogi and Masato Kotsugi. Automated identification of the origin of energy loss in nonoriented electrical steel by feature extended Ginzburg–Landau free energy framework. Scientific Reports. 15, Article number: 23758 (2025). https://doi.org/10.1038/s41598-025-00357-z\nMisato Tone, Shunsuke Sato, Sotaro Kunii, Ippei Obayashi, Yasuaki Hiraoka, Yui Ogawa, Hirokazu Fukidome, Alexandre Lira Foggiatto, Chiharu Mitsumata, Ryunsuke Nagaoka, Arpita Varadwaj, Iwao Matsuda, and Masato Kotsugi. Linking structure and process in dendritic growth using persistent homology with energy analysis. Science and Technology of Advanced Materials: Methods. 5(1), (2025) https://doi.org/10.1080/27660400.2025.2475735\nNaoto Kitamura, Hikari Matsubara, Koji Kimura, Ippei Obayashi, Yohei Onodera, Ken Nakashima, Hidetoshi Morita, Motoki Shiga, Yasuhiro Harada, Chiaki Ishibashi, Yasushi Idemoto and Koichi Hayashi. Relationship between network topology and negative electrode properties in Wadsley–Roth phase TiNb2O7. NPG Asia Materials, 16, Article number: 62 (2024). https://doi.org/10.1038/s41427-024-00581-5\nR. Nagaoka, K. Masuzawa, M. Taniwaki, A. L. Foggiatto, T. Yamazaki, I. Obayashi, Y. Hiraoka, C. Mitsumata, M. Kotsugi. Quantification of the coercivity factor in soft magnetic materials at different frequencies using topological data analysis. IEEE Transactions on Magnetics, 60 (9), Art no. 4000305, 1\u0026ndash;5, (2024). https://doi.org/10.1109/TMAG.2024.3408002\nA. L. Foggiatto, R. Nagaoka, M. Taniwaki, T. Yamazaki, T. Ogasawara, I. Obayashi, Y. Hiraoka, C. Mitsumata, M. Kotsugi. Analysis of the excess loss in high-frequency magnetization process through machine learning and topological data analysis. vol. 60, no. 9, pp. 1-5, Sept. 2024, Art IEEE Transactions on Magnetics, 60 (9), Art no. 7001305, 1\u0026ndash;5 (2024). https://doi.org/10.1109/TMAG.2024.3406717\nYuta Shuseki, Shinji Kohara, Tomoaki Kaneko, Keitaro Sodeyama, Yohei Onodera, Chihiro Koyama, Atsunobu Masuno, Shunta Sasaki, Shohei Hatano, Motoki Shiga, Ippei Obayashi, Yasuaki Hiraoka, Junpei T. Okada, Akitoshi Mizuno, Yuki Watanabe, Yui Nakata, Koji Ohara, Motohiko Murakami, Matthew G. Tucker, Marshall T. McDonnell, Hirohisa Oda, and Takehiko Ishikawa. Atomic and Electronic Structure in MgO–SiO2. J. Phys. Chem. A 128 (4), 716\u0026ndash;726 (2024). https://doi.org/10.1021/acs.jpca.3c05561\nEmi Minamitani, Ippei Obayashi, Koji Shimizu, and Satoshi Watanabe. Persistent homology-based descriptor for machine-learning potential of amorphous structures. The Journal of Chemical Physics 159, 084101 (2023). https://doi.org/10.1063/5.0159349\nIppei Obayashi, and Masao Kimura. Persistent homology analysis with nonnegative matrix factorization for 3D voxel data of iron ore sinters. JSIAM Letters 14, 151\u0026ndash;154 (2022) https://doi.org/10.14495/jsiaml.14.151\nEmi Minamitani, Takuma Shiga, Makoto Kashiwagi, and Ippei Obayashi. Topological descriptor of thermal conductivity in amorphous Si. J. Chem. Phys. 156, 244502 (2022) https://doi.org/10.1063/5.0093441\nEmi Minamitani, Takuma Shiga, Makoto Kashiwagi, and Ippei Obayashi. Relationship between local coordinates and thermal conductivity in amorphous carbon. Journal of Vacuum Science \u0026amp; Technology A 40, 033408 (2022). https://doi.org/10.1116/6.0001744\nYohei Onodera, Shinji Kohara, Philip S. Salmon, Akihiko Hirata, Norimasa Nishiyama, Suguru Kitani, Anita Zeidler, Motoki Shiga, Atsunobu Masuno, Hiroyuki Inoue, Shuta Tahara, Annalisa Polidori, Henry E. Fischer, Tatsuya Mori, Seiji Kojima, Hitoshi Kawaji, Alexander I. Kolesnikov, Matthew B. Stone, Matthew G. Tucker, Marshall T. McDonnell, Alex C. Hannon, Yasuaki Hiraoka, Ippei Obayashi, Takenobu Nakamura, Jaakko Akola, Yasuhiro Fujii, Koji Ohara, Takashi Taniguchi and Osami Sakata. Structure and properties of densified silica glass: characterizing the order within disorder. NPG Asia Materials volume 12, 85 (2020). https://doi.org/10.1038/s41427-020-00262-z\nAkihiko Hirata, Tomohide Wada, Ippei Obayashi and Yasuaki Hiraoka. Structural changes during glass formation extracted by computational homology with machine learning. Communications Materials 1, 98 (2020). https://doi.org/10.1038/s43246-020-00100-3\nChihiro Koyama, Shuta Tahara, Shinji Kohara, Yohei Onodera, Didrik R. Småbråten, Sverre M. Selbach, Jaakko Akola, Takehiko Ishikawa, Atsunobu Masuno, Akitoshi Mizuno, Junpei. T. Okada, Yuki Watanabe, Yui Nakata, Koji Ohara, Haruka Tamaru, Hirohisa Oda, Ippei Obayashi, Yasuyuki Hiraoka, and Osami Sakata. Very sharp diffraction peak in non-glass forming liquid with the formation of distorted tetraclusters. NPG Asia Materials 12, 43, (2020). https://doi.org/10.1038/s41427-020-0220-0\nEmi Minamitani, Takuma Shiga, Makoto Kashiwagi, and Ippei Obayashi. Relationship between local coordinates and thermal conductivity in amorphous carbon. Journal of Vacuum Science \u0026amp; Technology A 40, 033408 (2022). https://doi.org/10.1116/6.0001744\nYohei Onodera, Yasuyuki Takimoto, Hiroyuki Hijiya, Taketoshi Taniguchi, Shingo Urata, Seiji Inaba, Sanae Fujita, Ippei Obayashi, Yasuaki Hiraoka and Shinji Kohara. Origin of the mixed alkali effect in silicate glass. NPG Asia Materials 11 75 (2019). https://doi.org/10.1038/s41427-019-0180-4\nYohei ONODERA, Shinji KOHARA, Shuta TAHARA, Atsunobu MASUNO, Hiroyuki INOUE, Motoki SHIGA, Akihiko HIRATA, Koichi TSUCHIYA, Yasuaki HIRAOKA, Ippei OBAYASHI, Koji OHARA, Akitoshi MIZUNO, and Osami SAKATA. Understanding diffraction patterns of glassy, liquid and amorphous materials via persistent homology analyses. Journal of the Ceramic Society of Japan 2019 127(12) 853\u0026ndash;863, (2019). (article (open access))\nM. Murakami, S. Kohara, N. Kitamura, J. Akola, H. Inoue, A. Hirata, Y. Hiraoka, Y. Onodera, I. Obayashi, J. Kalikka, N. Hirao, T. Musso, A. S. Foster, Y. Idemoto, O. Sakata, and Y. Ohishi. Ultrahigh-pressure form of SiO2 glass with dense pyrite-type crystalline homology. Phys. Rev. B 99, 045153 (2019). (article)\nM. Kimura, I. Obayashi, Y. Takeichi, R. Murao, and Y. Hiraoka. Non-empirical identification of trigger sites in heterogeneous processes using persistent homology. Scientific Reports 8, 3553, (2018). (article (open access))\nTakashi Ichinomiya, Ippei Obayashi, and Yasuaki Hiraoka. Persistent homology analysis of craze formation. Phys. Rev. E 95, 012504, (2017) . (article)\nGeology\nAnna Suzuki, Miyuki Miyazawa, James M. Minto, Takeshi Tsuji, Ippei Obayashi, Yasuaki Hiraoka, an Takatoshi Ito. Flow estimation solely from image data through persistent homology analysis. Scientific Reports 11, 17948 (2021). https://doi.org/10.1038/s41598-021-97222-6 A.Suzuki, M.Miyazawa, A.Okamoto, H.Shimizu, I.Obayashi, Y.Hiraoka, T.Tsuji, P.K.Kang, and T.Ito. Inferring fracture forming processes by characterizing fracture network patterns with persistent homology. Computers \u0026amp; Geosciences 143, 104550 (2020). https://doi.org/10.1016/j.cageo.2020.104550 Life science\nStructural biology\nTakashi Ichinomiya, Ippei Obayashi, and Yasuaki Hiraoka. Protein folding analysis using features obtained by persistent homology. Biophysical Journal 118, 2926\u0026ndash;2937, (2020). https://doi.org/10.1016/j.bpj.2020.04.032 Medical science\nAsuka Oyama, Yasuaki Hiraoka, Ippei Obayashi, Yusuke Saikawa, Shigeru Furui, Kenshiro Shiraishi, Shinobu Kumagai, Tatsuya Hayashi and Jun’ichi Kotoku. Hepatic tumor classification using texture and topology analysis of non-contrast-enhanced three-dimensional T1-weighted MR images with a radiomics approach. Scientific Reports 9, 8764 (2019). (article (open access)) Other use cases # Materials science\nTakayuki Shiraiwa, Shoya Kato, Fabien Briffod, Manabu Enoki. Exploration of outliers in strength-ductility relationship of dual-phase steels\nYohei Shimizu, Takanori Kurokawa, Hirokazu Arai, Hitoshi Washizu. Higher-order structure of polymer melt described by persistent homology: Applications to the atomic data of polymer copmuted by MD simulations\nFumihiko Uesugi, Masashi Ishii. Classification for transmission electron microscope images from different amorphous states using persistent homology: TEM image analysis with ML\nIsshin Ando, Yasutaka Mugita, Kyosuke Hirayama, Shinji Munetoh, Masatoshi Aramaki, Fei Jiang, Takeshi Tsuji, Akihisa Takeuchi, Masayuki Uesugi, Yukiko Ozaki. Elucidation of pore connection mechanism during ductile fracture of sintered pure iron by applying persistent homology to 4D images of pores: Role of open pore\nSungyeon Hong, Donghun Kim. Medium-range order in amorphous ices revealed by persistent homology\nRyosuke Yano, Minkyu Kim. Topological analysis of pattern formation in cooling granular gases confined by elastic wall 松原典恵, 藤元伸悦, 谷口裕一, 林敬一. 分子動力学シミュレーションを用いた熱硬化性高分子材料の解析 長島大, 畑尾卓也. 分子動力学計算と機械学習による熱硬化性樹脂に関する階層的構造-物性相関解析\nMartin Cramer Pedersen, Vanessa Robins, Kell Mortensen, Jacob J. K. Kirkensgaard. Evolution of local motifs and topological proximity in self-assembled quasi-crystalline phases: 3D quasi-crystal Ryuhei Sato, Shinya Kawakami, Hirotaka Ejima, Takahiro Ujii, Koichi Sato, Takanori Ichiki, and Yasushi Shibuta. Dynamic Correlation Analysis between Stress–Strain Curve and Polymer Film Structure Using Persistent Homology. Journal of Chemical Theory and Computation. 20 (24) 10751\u0026ndash;11104 (2024)\nLife science\nMedical science\nY. Kawata, N. Niki, M. Kusumoto, H. Ohamatsu, K. Aokage, G. Ishii, Y. Matsumoto, T. Tsuchida, K. Eguchif, M. Kaneko. Representation of texture structures with topological data analysis for stage IA lung adenocarcinoma in three-dimensional thoracic CT images: Analysis of tumor images obtained by 3D thoracic CT\nKeita Koseki, Hiroshi Kawasaki, Toru Atsugi, Miki Nakanishi, Makoto Mizuno, Eiji Naru, Tamotsu Ebihara, Masayuki Amagai, Eiryo Kawakami. Assessment of skin barrier function using skin images with topological data analysis\nYsanne Pritchard, Aikta Sharma, Claire Clarkin, Helen Ogden, Sumeet Mahajan, Rubén J. Sánchez-García. Persistent homology analysis distinguishes pathological bone microstructure in non-linear microscopy images\nKohei Watarai, Hajime Omura, Teruya Minamoto, Esophageal Abnormality Detection from Endoscopic Images Using DT-CDWT and Persistent Homology\nHunter Dlugas. Electrocardiogram feature extraction and interval measurements using optimal representative cycles from persistent homology\nKei Takahashi, Ko Abe, Shimpei I. Kubota, Noriaki Fukatsu, Yasuyuki Morishita, Yasuhiro Yoshimatsu, Satoshi Hirakawa, Yoshiaki Kubota, Tetsuro Watabe, Shogo Ehata, Hiroki R. Ueda, Teppei Shimamura, Kohei Miyazono. An analysis modality for vascular structures combining tissue-clearing technology and topological data analysis Developmental biology\nYukiko Nakaya, Mitsusuke Tarama, Sohei Tasaki, Ayako Isomura, Tatsuo Shibata. Migrating mesoderm cells self-organize into a dynamic meshwork structure during chick gastrulation Geology\n鈴木和将, Huynh Quang Huy Viet, 宇田智紀, 水藤寛. デジタル廃棄物モデルを利用した間隙幾何情報の抽出及び評価法の検討\nMajid Bizhani, Omid Haeri Ardakani. Pore Characterization of Organic-Rich Shales through Application of Topological Data Analysis and Persistent Homology: Analysis of voxel data of organic-rich shales\nQCD (quantum chromodynamics)\nHiroaki Kouno, Kouji Kashiwa, Takehiro Hirakida. Z3-QCD and persistent homology\nTakehiro Hirakida, Kouji Kashiwa, Junpei Sugano, Junichi Takahashi, Hiroaki Kouno, Masanobu Yahiro. Persistent homology analysis of deconfinement transition in effective Polyakov-line model\nKouji Kashiwa, Takehiro Hirakida, Hiroaki Kouno. Persistent homology analysis for dense QCD effective model with heavy quarks\nCFD (computational fluid dynamics)\n伊藤雅仁, 奥脇弘次, 望月祐志, 小杉範仁. 題名：2次元翼モデルの可視化CFD結果に関する深層学習と位相的データ解析（Deep learning and Topological Data Analysis for Visualized CFD Results of 2-dimensional Wing Model） Astrophysics P. Santamarina Guerrero, Yukio Katsukawa, Shin Toriumi, and D. Orozco Suárez. Persistent Homology Analysis for Solar Magnetograms. The Astrophysical Journal 964 (1) Article number:32 (2024)\n","externalUrl":null,"permalink":"/use_cases/","section":"HomCloud","summary":"","title":"HomCloud Use Cases","type":"page"},{"content":"HomCloudにはコマンドラインインターフェース(CLI)とPythonインターフェースの2つのインターフェスが用意されています． Pythonのインターフェースの方がお勧めです． Pythonの科学技術計算エコシステムと組み合わせることでより便利にHomCloudを活用できます．\nPythonインターフェース # 3次元点群データ(ポイントクラウド) 二値画像 グレイスケール画像 3次元二値画像 機械学習との組み合わせ ベクトル化をPersistence codebookのPBoWにしたバージョン - Persistence codebookについては https://link.springer.com/article/10.1007/s10462-020-09897-4 を参照 材料科学データの解析(原子配置データ) 銅の結晶データ アモルファスシリカのデータ 距離行列(Vietoris-Rips) 周期境界3次元ポイントクラウド 周期境界画像 インタラクティブUI 点群の相対PH 3次元可視化にPlotlyを使ったバージョン:\n3次元点群データ(ポイントクラウド) 3次元二値画像 機械学習との組み合わせ このチュートリアルはjupyter notebookを使っています．チュートリアルをする前に jupyter notebookをインストールしてください．\nその後，python-tutorial.zipをダウンロードし，zipファイルを展開してください． そこで tutorial/python-interface/ というディレクトリが作られるので，そこにターミナルでcdで移動して，jupyter labとするとWebブラウザ上でUIが開かれます． そこに各チュートリアルに対応してディレクトリがあるので，それを開いてその下にある .ipynbファイルを開いてチュートリアルを実行してください．\nPython interface の API のドキュメントも参考にしてください。\nGoogle Colaboratoryによるチュートリアル # HomCloudは Google Colaboratory でも動作します。\n3次元点群データ(ポイントクラウド) 二値画像 グレイスケール画像 3次元二値画像 機械学習との組み合わせ 材料科学データの解析(原子配置データ) 銅の結晶データ アモルファスシリカのデータ 距離行列(Vietoris-Rips) 周期境界画像 点群の相対PH Jupyter notebookに関する話 # Jupyter notebookは勉強するのに使ったり試行錯誤には便利ですが，ある程度やることが固まってくると使いにくいと思います． そういうときは脱Jupyter notebookが必要なのでがんばってください．\n","externalUrl":null,"permalink":"/tutorials/","section":"HomCloud","summary":"","title":"HomCloud チュートリアル","type":"page"},{"content":"","externalUrl":null,"permalink":"/misc/","section":"Miscs","summary":"","title":"Miscs","type":"misc"},{"content":"","externalUrl":null,"permalink":"/series/","section":"Series","summary":"","title":"Series","type":"series"},{"content":" Link to Google Colab notebook ","externalUrl":null,"permalink":"/hyperordered-book-ph/","section":"Supplementary materials for persistent homology analysis in Hyperoerder book","summary":"","title":"Supplementary materials for persistent homology analysis in Hyperoerder book","type":"hyperordered-book-ph"},{"content":"","externalUrl":null,"permalink":"/tags/","section":"Tags","summary":"","title":"Tags","type":"tags"},{"content":" 1. Ubuntu(もしくはDebian)のパッケージをapt-getでインストール # 以下のように行います．\nsudo apt-get install libcgal-dev libpython3-dev python3-matplotlib python3-numpy python3-scipy python3-pip python3-msgpack python3-pulp python3-sklearn paraview python3-paraview jupyter 2. pipを使ってさらにライブラリを追加 # 以下のようにタイプしてインストールします．\npip install --user wheel Cython pyqt6 \u0026quot;pyvista[all,trame]\u0026quot; pyvistaqt pip install --user ripser 3. 最新版のhomcloudをインストール # 以下を実行します．\npip3 install --user homcloud 古いバージョンをインストールする場合 # 古いバージョンのHomCloud (3.6.0など) をインストールする場合には代わりに次のようにします．\npip3 install --user homcloud==3.6.0 4. HomCloudの自己チェックプログラムを動かす # 最後に正常にインストールされているかどうかを調べるためにターミナルで以下のように実行します．\npython3 -m homcloud.self_check --pyvista 以下のような画像が表示されたウィンドウが開かれます． 開かれたウィンドウは閉じてください．\n最終的にコマンドプロンプトに以下のように表示されていたらOKです(バージョンの値は違っていてかまいません)．\nHomCloud version: 4.4.0 Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] CGAL version: 5.6 (1050601000) Alpha Shape 3 ... ok Alpha Shape 3 with weights ... ok Periodic Alpha Shape 3 with weights ... ok Alpha Shape 2 ... ok Grayscale 2D bitmap ... ok Binary 2D bitmap ... ok Binary 2D periodic bitmap ... ok Rips filtration ... ok Plotting PD ... ok Optimal Volume ... ok PyVista 3D drawing (close the pop-up window)... ok 以上でインストールは終わりです．\n5. (Optional) http://github.com/DIPHA/diphaからdiphaをダウンロードし，インストール # Veitoris-Rips 複体(距離行列)や高次元(4次元以上)のボクセルデータの解析のために dipha をインストールします． もしこれらを使わない場合はここは飛ばしてよいです．\nsudo apt-get install openmpi-bin libopenmpi-dev cmake で Dipha のビルドに必要なライブラリをインストールします\nhttps://github.com/DIPHA/dipha/archive/dipha-2.1.0.zip からダウンロードしてください．\nダウンロードしたファイルを解凍してください．\n解凍時に作られたディレクトリに移動してください．\n\u0026ldquo;cmake .\u0026ldquo;とタイプし，makefileを作成します．\n\u0026ldquo;make\u0026quot;とタイプし，ビルドします．\nビルドされたdiphaの実行ファイルをパスの通ったディレクトリへコピーしてください\nインストール終了後，以下のようにしてHomCloudが正常に動くかチェックします．\npython3 -m homcloud.self_check --dipha ","externalUrl":null,"permalink":"/install-guide/install_guide_for_ubuntu/","section":"HomCloud Install Guide","summary":"","title":"UbuntuやDebianでのインストール","type":"install-guide"},{"content":"ここでは python の venv という仮想環境ツールを使ってインストールします． homcloudをインストールする環境を分離することでバージョンの使い分けなどが簡単になります．\n1. 以下のパッケージをapt-getでインストールします。 # 以下のように行います。\nsudo apt-get update sudo apt-get install python3-all-dev python3-venv 2. venvで環境を新しく作る # まず作業用のディレクトリを作ります．ここではhomcloudという名前にしましょう．\nmkdir homcloud cd homcloud 次のようにして venv の設定を作ります．\npython3 -m venv venv 3. venvの環境に入る # 作業用のディレクトリで以下のようにして venv の環境に入ります．\nsource ./venv/bin/activate これはシェルを起動するごとに必要です．\n4. 最新版のHomCloudをインストールします。 # 以下を実行します。\npip install wheel pip install \u0026quot;homcloud[recommended]\u0026quot; 5. HomCloudの自己チェックプログラムを動かす # 最後に正常にインストールされているかどうかを調べるためにターミナルで以下のように 実行します．\npython -m homcloud.self_check --pyvista 以下のような画像が表示されたウィンドウが開かれます． 開かれたウィンドウは閉じてください．\n最終的にコマンドプロンプトに以下のように表示されていたらOKです(バージョンの値は違っていてかまいません)．\nHomCloud version: 4.0.0 Python version: 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] Alpha Shape 3 ... ok Alpha Shape 3 with weights ... ok Periodic Alpha Shape 3 with weights ... ok Alpha Shape 2 ... ok Grayscale 2D bitmap ... ok Binary 2D bitmap ... ok Binary 2D periodic bitmap ... ok Rips filtration ... ok Plotting PD ... ok Optimal Volume ... ok PyVista 3D drawing (close the pop-up window)... ok 以上でインストールは終わりです。\n6. チュートリアルの実施 # HomCloudのチュートリアルを動かしてみましょう． チュートリアルのページからzipファイルからダウンロードしてhomcloudフォルダに展開してください。 その後，venvの仮想環境に入って\njupyter notebook とするとブラウザがポップアップし，jupyter notebookが起動します． ここでチュートリアルのフォルダからチュートリアルを始めてください． いくつかチュートリアルがありますが，pointcloudが一番やりやすいでしょう．\n7. (Optional) http://github.com/DIPHA/diphaからdiphaをダウンロードし、インストールします。 # 高次元(4次元以上)のボクセルデータの解析のために dipha をインストールします。 必要ない場合はここは飛ばしてよいです。\nsudo apt-get install openmpi-bin libopenmpi-dev cmake で Dipha のビルドに必要なライブラリをインストールします\nhttps://github.com/DIPHA/dipha/archive/dipha-2.1.0.zip からダウンロードしてください．\nダウンロードしたファイルを解凍してください．\n解凍時に作られたディレクトリに移動してください．\n\u0026ldquo;cmake .\u0026ldquo;とタイプし，makefileを作成します．\n\u0026ldquo;make\u0026quot;とタイプし，ビルドします．\nビルドされたdiphaの実行ファイルをパスの通ったディレクトリへコピーしてください\nインストール終了後，以下のようにしてHomCloudが正常に動くかチェックします．\npython3 -m homcloud.self_check --dipha ","externalUrl":null,"permalink":"/install-guide/install_guide_for_ubuntu_venv/","section":"HomCloud Install Guide","summary":"","title":"UbuntuやDebianでのインストール(venv使用)","type":"install-guide"},{"content":"Windowsでインストールするには、以下の2通りあります。お使いの環境に合わせて設定してください。\nWindows用の個々のパッケージをインストール (以下の説明を参考にインストールをする) WSL(Windows Subsystem for Linux)の ubuntu linux などのlinux 環境でインストールする (ubuntu用のインストールガイドにしたがってインストールをすすめる)。ubuntu linux以外での WSL をお使いの場合は必要な各パッケージをそれぞれのOS用に置き換えてインストールをお試しください。GUIツールを使うためには Xwindow の動作環境が必要になります 0. 環境チェック # Windows へのインストールにあたって，\nログイン名がかな漢字を含んでいる 空白を含んでいる などの場合にはうまく動作しません．これは HomCloud の問題というよりも Python の問題です． 海外製のソフトウェアにはよくある問題です．\nこの問題の確認のためにコマンドプロンプトを起動します． コマンドプロンプトはスタートメニューからWindowsシステムツール→コマンドプロンプトと探せば見つかるでしょう。 すると次のようなウィンドウが表示されます．\nこのスクリーンショットだと C:\\Users\\ohai と表示されている所の ohai に対応する場所を見てください． ここに日本語が含まれていると問題が発生します．\n解決策ですが新しいアカウントを作るのが一番手っ取り早いでしょう．\n1. Pythonのインストール # https://www.python.org/downloads/windows/ から64bit版のpythonのインストーラー(ここでは例としてWindows x86-64 web-based installerをとりあげます。)をダウンロードし、クリックしてインストールをします。 Pythonのバージョンは3.11から3.14の間を選んでください． 以下では3.11を使う例を示します．\nPythonをインストールする場所(パス)に日本語(全角文字)が入らない場所を選んでください。 現状では全角文字がパスに含まれてしまうと python からファイルの読み書きを行う時にエラーになります。\n2. venvによる環境構築 # ここでは venv という環境分離機構を使って環境を設定します。 まずは環境構築のためのフォルダを作ります。まずは homcloud というフォルダを作ります。 例えばコマンドプロントを起動して次のようにするとフォルダが作られます．\nmkdir homcloud 次に venv をセットアップします。 コマンドプロントを起動して、以下のコマンドを打つことでhomcloudのフォルダ下にvenv311フォルダが作成されます。\ncd homcloud py -3.11 -m venv venv311 ここでの注意として，フォルダ名に英数字以外の文字が含まれているとうまく動きません．親フォルダも含んでいていはいけないことに注意してください．\n3. venvの環境内に移動する # 次のように打ち込むと環境内に移動できます。\nvenv311\\Scripts\\activate この操作はコマンドプロンプトを起動するごとにやる必要があることに注意してください。\n4. pythonのパッケージをインストールする # 必要なパッケージを上で起動したコマンドプロンプトよりインストールします。 以下のように打ち込みます．コピー\u0026amp;ペーストでもOKです。\npip install wheel 5. HomCloudのインストール # 以下のようにインストールします。\npip install homcloud 6. HomCloudの自己チェックプログラムを動かす # 最後に正常にインストールされているかどうかを調べるためにターミナルで以下のように実行します．\npython -m homcloud.self_check --pyvista 以下のような画像が表示されたウィンドウが開かれます． 開かれたウィンドウは閉じてください．\n最終的にコマンドプロンプトに以下のように表示されていたらOKです(バージョンの値は違っていてかまいません)．\nHomCloud version: 4.4.0 Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] CGAL version: 5.6 (1050601000) Alpha Shape 3 ... ok Alpha Shape 3 with weights ... ok Periodic Alpha Shape 3 with weights ... ok Alpha Shape 2 ... ok Grayscale 2D bitmap ... ok Binary 2D bitmap ... ok Binary 2D periodic bitmap ... ok Rips filtration ... ok Plotting PD ... ok Optimal Volume ... ok PyVista 3D drawing (close the pop-up window)... ok 以上でインストールは終わりです。\n7. チュートリアルの実行 # インストール完了はチュートリアルを動かしてるとよいでしょう。 チュートリアルのページ からzipファイルからダウンロードして homcloud フォルダに展開してください。\n次にチュートリアルで利用する jupyter notebook をインストールします。\npip install jupyter でインストールできます。インストール後、homcloudフォルダで\njupyter notebook とするとブラウザがポップアップし、jupyter notebookが起動します。 ここでチュートリアルのフォルダから チュートリアルを始めてください。いくつかチュートリアルがありますが、 pointcloudが一番やりやすいでしょう。\n","externalUrl":null,"permalink":"/install-guide/install_guide_for_windows/","section":"HomCloud Install Guide","summary":"","title":"Windows 64bitマシンでのインストール","type":"install-guide"}]