Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial rearranging of files #57

Merged
merged 4 commits into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pipelines/toast_bin_so3g.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import toast.tod
import toast.pipeline_tools as toast_tools

from sotodlib.data.toast_load import load_data
from sotodlib.io.toast_load import load_data


def main():
Expand Down
4 changes: 2 additions & 2 deletions pipelines/toast_so_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import toast.map as tm
import toast.tod as tt

from sotodlib.hardware import get_example, sim_telescope_detectors
from sotodlib.data.toast_load import load_data
from sotodlib.sim_hardware import get_example, sim_telescope_detectors
from sotodlib.io.toast_load import load_data


def binned_map(data, npix, subnpix, out="."):
Expand Down
4 changes: 1 addition & 3 deletions pipelines/toast_so_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@

import toast.pipeline_tools as toast_tools

import sotodlib.pipeline_tools as so_tools
import sotodlib.utils.pipeline_tools as so_tools

import numpy as np

import sotodlib.hardware

import warnings

warnings.filterwarnings("ignore")
Expand Down
4 changes: 1 addition & 3 deletions pipelines/toast_so_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@

import toast.pipeline_tools as toast_tools

import sotodlib.pipeline_tools as so_tools
import sotodlib.utils.pipeline_tools as so_tools

import numpy as np

import sotodlib.hardware

import warnings

warnings.filterwarnings("ignore")
Expand Down
10 changes: 6 additions & 4 deletions sotodlib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018-2019 Simons Observatory.
# Copyright (c) 2018-2020 Simons Observatory.
# Full license can be found in the top level "LICENSE" file.
"""Simons Observatory TOD Simulation and Processing.

Expand All @@ -8,9 +8,11 @@

Contents:

* db: database access for detector properties, observations, etc.
* toast: tools specifically for working with the external TOAST package.
* scripts: commandline entry points.
* core: Container classes for data, metadata, etc.
* io: Code for reading / writing data.
* utils: General utility functions and data helper functions.
* scripts: Commandline entry points.
* Top level packages for actual data processing.

"""

Expand Down
11 changes: 10 additions & 1 deletion sotodlib/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Copyright (c) 2018-2020 Simons Observatory.
# Full license can be found in the top level "LICENSE" file.
"""Simons Observatory core routines.

This module has containers and in-memory structures for data and metadata.

"""
from .context import Context

from .axisman import AxisManager
from .axisman import IndexAxis, OffsetAxis, LabelAxis

from .context import Context
from .hardware import Hardware
10 changes: 5 additions & 5 deletions sotodlib/core/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import yaml
import os

from .. import metadata
from . import metadata


class Context(odict):
Expand Down Expand Up @@ -77,11 +77,11 @@ def reload(self, load_list='all'):

"""
# Metadata support databases.
for key, cls in [('detdb', metadata.DetDB),
('obsdb', metadata.ObsDB),
('obsfiledb', metadata.ObsFileDB)]:
for key, cls in [('detdb', metadata.DetDb),
('obsdb', metadata.ObsDb),
('obsfiledb', metadata.ObsFileDb)]:
if (load_list == 'all' or key in load_list) and key in self:
# E.g. self.detdb = DetDB.from_file(self['detdb']
# E.g. self.detdb = DetDb.from_file(self['detdb']
db = cls.from_file(self[key])
setattr(self, key, db)
# The metadata loader.
Expand Down
File renamed without changes.
Loading