PAOFLOW.pyskeaf.orbits#
Detection of closed extremal orbits in one 2D slice.
Modernised replacement for the Fortran sliceext walking algorithm
(skeaf_v1p3p0_r149.F90 lines 3768–4445). Instead of the pixel-by-pixel
boundary walk we use skimage.measure.find_contours to obtain the
iso-EF level sets of the slice in one vectorised pass, then compute the
same per-orbit observables (area, centroid, std, bbox, orbit type,
effective mass) that sliceext populates into the global slfs* arrays.
Outputs match the Fortran semantics:
areas in Å^-2
frequencies in kT (= Tesla × 1000) via
CONV_FSAREA_TO_KTeffective mass in electron masses via
CONV_FSDADE_TO_MSTARfractional supercell coordinates
avg_xy_frac, std_xy_frac, min/max_xy_fracin [0, 1]orbit type
+1electron-like,-1hole-like,0ambiguous
Phase 4 additions (cross-slice matching, extremum detection, averaging)
appear after find_closed_orbits_in_slice() below. They are direct
translations of the main-program loops in skeaf_v1p3p0_r149.F90 lines
1410–2700, preserving the 19-condition matching predicate, the bifurcation
detection (forward + reverse), the floater-displacement loop (capped at
500 iterations), the supercell→RUC centroid mapping, the same-centre
grouping with periodic ±1 wrap, and the freq-similarity averaging.
Classes#
One closed FS contour found in a single slice. |
|
A trajectory of one orbit through consecutive slices. |
|
One extremum found inside a chunk (one local min/max of area vs slice). |
|
One physical extremal orbit (after averaging supercell copies). |
Functions#
|
Locate every closed FS orbit in one slice and compute its observables. |
|
Build chunks from a list of per-slice orbit lists. |
|
Find extremal orbits within each chunk (Fortran lines 1965–2050). |
|
Group supercell-copy extrema, average each group, and return sorted-by-frequency. |
Module Contents#
- class PAOFLOW.pyskeaf.orbits.SliceOrbit[source]#
One closed FS contour found in a single slice.
- contour_xy: numpy.ndarray[source]#
- avg_xy_frac: numpy.ndarray[source]#
- std_xy_frac: numpy.ndarray[source]#
- min_xy_frac: numpy.ndarray[source]#
- max_xy_frac: numpy.ndarray[source]#
- PAOFLOW.pyskeaf.orbits.find_closed_orbits_in_slice(slice2d, fermi_energy, *, keep_too_small=False, keep_open=False)[source]#
Locate every closed FS orbit in one slice and compute its observables.
- Parameters:
slice2d (
PAOFLOW.pyskeaf.slice_ops.Slice2D) – Energies sampled on the (numx × numy) supercell slice.fermi_energy (float) – Fermi level in Rydbergs.
keep_too_small (bool) – If True, retain orbits whose area is below
minarea = 2 Δkx Δky(Fortranminarea) or that touch the supercell boundary. These are flagged viais_too_small/is_openwhile their area / frequency / mass fields remain populated for diagnostics. Default behaviour mirrors Fortran (drops them).keep_open (bool) – If True, retain orbits whose area is below
minarea = 2 Δkx Δky(Fortranminarea) or that touch the supercell boundary. These are flagged viais_too_small/is_openwhile their area / frequency / mass fields remain populated for diagnostics. Default behaviour mirrors Fortran (drops them).
- class PAOFLOW.pyskeaf.orbits.Chunk[source]#
A trajectory of one orbit through consecutive slices.
Mirrors the Fortran
c*arrays (carea, cavgx, cnobif, cfsfromslice…) indexed by chunk number and per-chunk position.orbits[i]is the SliceOrbit at the i-th step in the chunk;no_bif[i]mirrorscnobifat that position.slice_indices[i]is the 1-based slice that orbit was found on.- orbits: List[SliceOrbit][source]#
- class PAOFLOW.pyskeaf.orbits.ExtremalOrbit[source]#
One extremum found inside a chunk (one local min/max of area vs slice).
- slice_orbit: SliceOrbit[source]#
- avg_xyz_ruc: numpy.ndarray[source]#
- class PAOFLOW.pyskeaf.orbits.AveragedOrbit[source]#
One physical extremal orbit (after averaging supercell copies).
- avg_xyz_ruc: numpy.ndarray[source]#
- avg_xyz_ruc_std: numpy.ndarray[source]#
- representative: ExtremalOrbit[source]#
- PAOFLOW.pyskeaf.orbits.match_chunks(per_slice_orbits)[source]#
Build chunks from a list of per-slice orbit lists.
per_slice_orbits[s-1](1-based slices) is the output offind_closed_orbits_in_slice()for slices. Returns the list of chunks (in order of creation).Implements the full matching logic of skeaf lines 1410–1953 including forward/reverse bifurcation detection and the floater displacement loop (capped at 500 iterations per slice-orbit, matching Fortran).
- PAOFLOW.pyskeaf.orbits.find_extremal(chunks, geom, *, min_freq_kT=0.0, allow_near_walls=False)[source]#
Find extremal orbits within each chunk (Fortran lines 1965–2050).
For each interior position in a chunk (i.e. not at chunk endpoints), flag the orbit as extremal if its area is a local min, local max, or equals its predecessor’s. Compute curvature from the 3-point neighbourhood and convert centroid to RUC fractional coords. Apply
minextfreqcutoff and (optionally) reject orbits whose bbox lies within 2·std of a supercell wall (matching Fortran’sallowextnearwallsdefault-no behaviour).
- PAOFLOW.pyskeaf.orbits.average_orbits(extrema, *, freq_same_frac=0.01, avg_same_frac=0.05)[source]#
Group supercell-copy extrema, average each group, and return sorted-by-frequency.
Combines the same-centre grouping (lines 2188–2266) with the per-group frequency clustering (lines 2284–2453) and the final global frequency sort (lines 2474–2538).