Skip to content

BUG/DOC: describe constellation_to_inst naming issues #127

@jklenzing

Description

@jklenzing

Description

Currently, Constellation.to_inst() appends variable names with strings based on platform, name, etc to each variable name. There are some use cases where this is not desirable.

For simulated spacecraft generated from pysatMissions instruments, multiple spacecraft can be instantiated using 'missions_skyfield' with different TLE inputs. These cannot be combine as each will be appended with the same tag.

To Reproduce this bug:

import datetime as dt

import pysat
import pysatMissions

inclinations = [83.0915, 83.4173]
mean_altitude = 375.0
raan = 0.0
arg_perigee = 0.0
mean_anomaly = 0.0

satellites = []
for i in range(0, 2):
    satellites.append(pysat.Instrument(
        inst_module=pysatMissions.instruments.missions_skyfield, name=names[i],
        inclination=inclinations[i], alt_periapsis=mean_altitude, raan=raan,
        arg_periapsis=arg_perigee, mean_anomaly=mean_anomaly))

constellation = pysat.Constellation(instruments=satellites)
constellation.load(date=dt.datetime(2019, 1, 1))
inst = constellation.to_inst()

compare constellations[0].data, constellations[1].data, and inst.data. The instrument object will only include the last set of positional data from constellation[1].

Test configuration

  • OS: Mac 14.7
  • Version python 3.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions