cosmotron_mcp.tools.catalogue¶
inspect_catalogue ¶
Inspect a catalogue file and return metadata without loading full arrays.
Supports FITS, HDF5 (.h5, .hdf5), CSV, and ASCII formats.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fits_path
|
str
|
Path to the catalogue file. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
A summary dict (columns, row count, format) suitable for passing to |
dict
|
an LLM as context. |
Source code in cosmotron_mcp/server.py
write_standardised_catalogue ¶
write_standardised_catalogue(input_path: str, output_path: str, ra_col: str, dec_col: str, z_col: str | None = None, weight_col: str | None = None, z_min: float | None = None, z_max: float | None = None, e1_col: str | None = None, e2_col: str | None = None) -> dict
Read a raw catalogue via memmap, normalise, write standardised FITS.
PREFER ingest_to_session — @data_ingestor calls ONLY that; this is
the low-level primitive it's built on, for scripts/CLI use.
Memory-efficient: in-place normalisation, BinTableHDU write (no Table copy). For a shear catalogue pass BOTH e1_col and e2_col — the output gains E1/E2 columns and the stats include sigma_e_measured (Heymans+2012).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_path
|
str
|
Path to the raw catalogue file. |
required |
output_path
|
str
|
Destination standardised FITS path. |
required |
ra_col
|
str
|
Right-ascension column name in the raw catalogue. |
required |
dec_col
|
str
|
Declination column name in the raw catalogue. |
required |
z_col
|
str | None
|
Redshift column name; omit if the catalogue has none. |
None
|
weight_col
|
str | None
|
Weight column name; omit to fill weight=1. |
None
|
z_min
|
float | None
|
Optional inclusive-lower redshift bound to slice on. |
None
|
z_max
|
float | None
|
Optional exclusive-upper redshift bound to slice on. |
None
|
e1_col
|
str | None
|
First shear-ellipticity column; pass together with
|
None
|
e2_col
|
str | None
|
Second shear-ellipticity column; pass together with
|
None
|
Returns:
| Type | Description |
|---|---|
dict
|
|
dict
|
|
dict
|
|