Skip to content

Commit

Permalink
removing pynanomapper references
Browse files Browse the repository at this point in the history
  • Loading branch information
vedina committed Aug 8, 2024
1 parent ffc874a commit 6ff2b17
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/datamodel/ambit.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def custom_encoder(obj):
Examples:
from typing import List
from pynanomapper.datamodel.ambit import EffectRecord, Protocol, EndpointCategory, ProtocolApplication
from pyambit.datamodel.ambit import EffectRecord, Protocol, EndpointCategory, ProtocolApplication
effect_list: List[EffectRecord] = []
effect_list.append(EffectRecord(endpoint="Endpoint 1", unit="Unit 1", loValue=5.0))
effect_list.append(EffectRecord(endpoint="Endpoint 2", unit="Unit 2", loValue=10.0))
Expand Down Expand Up @@ -433,7 +433,7 @@ class Study(AmbitModel):
Example:
# Creating an instance of Substances, with studies
# Parse json retrieved from AMBIT services
from pynanomapper.datamodel.measurements import Study
from pyambit.datamodel.measurements import Study
import requests
url = "https://apps.ideaconsult.net/gracious/substance/GRCS-7bd6de68-a312-3254-8b3f-9f46d6976ce6"
response = requests.get(url+"/study?media=application/json")
Expand Down Expand Up @@ -569,7 +569,7 @@ class Substances(AmbitModel):
Example:
# Creating an instance of Substances, with studies
# Parse json retrieved from AMBIT services
from pynanomapper.datamodel.measurements import Substances
from pyambit.datamodel.measurements import Substances
_p = Substances(**parsed_json)
for substance in _p.substance:
papps = substance.study
Expand Down
4 changes: 2 additions & 2 deletions src/datamodel/nexus_spectra.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import nexusformat.nexus.tree as nx
import numpy as np
import numpy.typing as npt
import pynanomapper.datamodel.ambit as mx
import pyambit.datamodel.ambit as mx
import ramanchada2 as rc2
from pynanomapper.datamodel.nexus_writer import to_nexus
from pyambit.datamodel.nexus_writer import to_nexus
from ramanchada2.misc.types.fit_peaks_result import FitPeaksResult


Expand Down
12 changes: 6 additions & 6 deletions src/datamodel/nexus_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
Exception: on parse
Examples:
from pynanomapper.datamodel.nexus_writer import to_nexus
from pynanomapper.datamodel.measurements import ProtocolApplication
from pyambit.datamodel.nexus_writer import to_nexus
from pyambit.datamodel.measurements import ProtocolApplication
pa = ProtocolApplication(**json_data)
import nexusformat.nexus.tree as nx
ne = pa.to_nexus(nx.NXroot())
Expand Down Expand Up @@ -273,8 +273,8 @@ def to_nexus(study: mx.Study, nx_root: nx.NXroot() = None):
Exception: on parse
Examples:
import pynanomapper.datamodel.measurements as m2n
from pynanomapper.datamodel.nexus_writer import to_nexus
import pyambit.datamodel.measurements as m2n
from pyambit.datamodel.nexus_writer import to_nexus
import nexusformat.nexus.tree as nx
substance="GRCS-18f0f0e8-b5f4-39bc-b8f8-9c869c8bd82f"
url = "https://apps.ideaconsult.net/gracious/substance/{}?media=application/json".format(substance)
Expand Down Expand Up @@ -717,9 +717,9 @@ def papp_mash(df, dfcols, condcols, drop_parsed_cols=True):
return df


# from pynanomapper.datamodel.measurements import ProtocolApplication
# from pyambit.datamodel.measurements import ProtocolApplication
# pa = ProtocolApplication(**json_data)
# from pynanomapper.datamodel import measurements2nexus as m2n
# from pyambit.datamodel import measurements2nexus as m2n
# df_samples, df_controls = m2n.papp2df(pa, _col="CONCENTRATION")
def papp2df(pa: mx.ProtocolApplication, _cols=["CONCENTRATION"], drop_parsed_cols=True):
df, dfcols, resultcols, condcols = effects2df(pa.effects, drop_parsed_cols)
Expand Down

0 comments on commit 6ff2b17

Please sign in to comment.