Activity analysis

Ground-area-aware metrics of jet activity: per-tile marking density (markings per m²) and per-marking ground area (m²). Pure analysis — lives at top level alongside :mod:p4tools.classify_by_activity, not under production/.

Tile ground area


source

tile_ground_area_m2


def tile_ground_area_m2(
    obsids:NoneType=None, # If given, restrict to this iterable of obsid strings; otherwise
return for all obsids in the catalog version.
    version:str='v3.1'
)->Series:

Tile ground area in m² per obsid.

Each P4 tile is 840×648 pixels; ground area = 840 * 648 * map_scale**2. For v3.1 map_scale is one of {0.25, 0.5, 1.0} m/px, giving tile ground areas of {34 020, 136 080, 544 320} m² respectively.

Per-tile marking density


source

per_tile_marking_density


def per_tile_marking_density(
    version:str='v3.1',
    kind:str='all', # Which markings to count for ``density_per_m2``. ``"all"`` (default)
is fan + blotch, the recommended activity proxy. The per-kind counts
``n_fans`` / ``n_blotches`` are always present.
)->DataFrame:

Per-tile counts and marking density (markings per m² of ground area).

Returned columns: [obsid, tile_id, n_fans, n_blotches, n_markings, map_scale, tile_ground_area_m2, density_per_m2].

Per-marking ground area


source

per_marking_ground_area


def per_marking_ground_area(
    version:str='v3.1', kind:str='both', # Which catalog(s) to process. Default ``"both"``.
    cache:bool=True, cache_dir:pathlib.Path | None=None
)->DataFrame:

Per-marking polygon area in m².

Computes Shapely polygons for every fan / blotch using markings.{Fan,Blotch}.to_shapely (HiRISE pixel scope), takes polygon.area in pixel², and converts to m² via per-obsid map_scale. Result is cached as parquet next to the coverage cache.