repository_name
stringlengths
7
55
func_path_in_repository
stringlengths
4
223
func_name
stringlengths
1
134
whole_func_string
stringlengths
75
104k
language
stringclasses
1 value
func_code_string
stringlengths
75
104k
func_code_tokens
listlengths
19
28.4k
func_documentation_string
stringlengths
1
46.9k
func_documentation_tokens
listlengths
1
1.97k
split_name
stringclasses
1 value
func_code_url
stringlengths
87
315
phoebe-project/phoebe2
phoebe/backend/universe.py
Star_roche.needs_remesh
def needs_remesh(self): """ whether the star needs to be re-meshed (for any reason) """ # TODO: may be able to get away with removing the features check and just doing for pulsations, etc? # TODO: what about dpdt, deccdt, dincldt, etc? return len(self.features) > 0 or sel...
python
def needs_remesh(self): """ whether the star needs to be re-meshed (for any reason) """ # TODO: may be able to get away with removing the features check and just doing for pulsations, etc? # TODO: what about dpdt, deccdt, dincldt, etc? return len(self.features) > 0 or sel...
[ "def", "needs_remesh", "(", "self", ")", ":", "# TODO: may be able to get away with removing the features check and just doing for pulsations, etc?", "# TODO: what about dpdt, deccdt, dincldt, etc?", "return", "len", "(", "self", ".", "features", ")", ">", "0", "or", "self", "....
whether the star needs to be re-meshed (for any reason)
[ "whether", "the", "star", "needs", "to", "be", "re", "-", "meshed", "(", "for", "any", "reason", ")" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/backend/universe.py#L1922-L1928
phoebe-project/phoebe2
phoebe/backend/universe.py
Star_roche_envelope_half._build_mesh
def _build_mesh(self, mesh_method, **kwargs): """ this function takes mesh_method and kwargs that came from the generic Body.intialize_mesh and returns the grid... intialize mesh then takes care of filling columns and rescaling to the correct units, etc """ # need the sma to sca...
python
def _build_mesh(self, mesh_method, **kwargs): """ this function takes mesh_method and kwargs that came from the generic Body.intialize_mesh and returns the grid... intialize mesh then takes care of filling columns and rescaling to the correct units, etc """ # need the sma to sca...
[ "def", "_build_mesh", "(", "self", ",", "mesh_method", ",", "*", "*", "kwargs", ")", ":", "# need the sma to scale between Roche and real units", "sma", "=", "kwargs", ".", "get", "(", "'sma'", ",", "self", ".", "sma", ")", "# Rsol (same units as coordinates)", "m...
this function takes mesh_method and kwargs that came from the generic Body.intialize_mesh and returns the grid... intialize mesh then takes care of filling columns and rescaling to the correct units, etc
[ "this", "function", "takes", "mesh_method", "and", "kwargs", "that", "came", "from", "the", "generic", "Body", ".", "intialize_mesh", "and", "returns", "the", "grid", "...", "intialize", "mesh", "then", "takes", "care", "of", "filling", "columns", "and", "resc...
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/backend/universe.py#L2177-L2244
phoebe-project/phoebe2
phoebe/backend/universe.py
Star_sphere._build_mesh
def _build_mesh(self, mesh_method, **kwargs): """ this function takes mesh_method and kwargs that came from the generic Body.intialize_mesh and returns the grid... intialize mesh then takes care of filling columns and rescaling to the correct units, etc """ # if we don't provide...
python
def _build_mesh(self, mesh_method, **kwargs): """ this function takes mesh_method and kwargs that came from the generic Body.intialize_mesh and returns the grid... intialize mesh then takes care of filling columns and rescaling to the correct units, etc """ # if we don't provide...
[ "def", "_build_mesh", "(", "self", ",", "mesh_method", ",", "*", "*", "kwargs", ")", ":", "# if we don't provide instantaneous masses or smas, then assume they are", "# not time dependent - in which case they were already stored in the init", "sma", "=", "kwargs", ".", "get", "...
this function takes mesh_method and kwargs that came from the generic Body.intialize_mesh and returns the grid... intialize mesh then takes care of filling columns and rescaling to the correct units, etc
[ "this", "function", "takes", "mesh_method", "and", "kwargs", "that", "came", "from", "the", "generic", "Body", ".", "intialize_mesh", "and", "returns", "the", "grid", "...", "intialize", "mesh", "then", "takes", "care", "of", "filling", "columns", "and", "resc...
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/backend/universe.py#L2506-L2555
phoebe-project/phoebe2
phoebe/backend/universe.py
Envelope.populate_observable
def populate_observable(self, time, kind, dataset, **kwargs): """ TODO: add documentation """ for half in self._halves: half.populate_observable(time, kind, dataset, **kwargs)
python
def populate_observable(self, time, kind, dataset, **kwargs): """ TODO: add documentation """ for half in self._halves: half.populate_observable(time, kind, dataset, **kwargs)
[ "def", "populate_observable", "(", "self", ",", "time", ",", "kind", ",", "dataset", ",", "*", "*", "kwargs", ")", ":", "for", "half", "in", "self", ".", "_halves", ":", "half", ".", "populate_observable", "(", "time", ",", "kind", ",", "dataset", ",",...
TODO: add documentation
[ "TODO", ":", "add", "documentation" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/backend/universe.py#L2743-L2749
phoebe-project/phoebe2
phoebe/backend/universe.py
Spot.from_bundle
def from_bundle(cls, b, feature): """ Initialize a Spot feature from the bundle. """ feature_ps = b.get_feature(feature) colat = feature_ps.get_value('colat', unit=u.rad) longitude = feature_ps.get_value('long', unit=u.rad) if len(b.hierarchy.get_stars())>=2: ...
python
def from_bundle(cls, b, feature): """ Initialize a Spot feature from the bundle. """ feature_ps = b.get_feature(feature) colat = feature_ps.get_value('colat', unit=u.rad) longitude = feature_ps.get_value('long', unit=u.rad) if len(b.hierarchy.get_stars())>=2: ...
[ "def", "from_bundle", "(", "cls", ",", "b", ",", "feature", ")", ":", "feature_ps", "=", "b", ".", "get_feature", "(", "feature", ")", "colat", "=", "feature_ps", ".", "get_value", "(", "'colat'", ",", "unit", "=", "u", ".", "rad", ")", "longitude", ...
Initialize a Spot feature from the bundle.
[ "Initialize", "a", "Spot", "feature", "from", "the", "bundle", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/backend/universe.py#L2840-L2866
phoebe-project/phoebe2
phoebe/backend/universe.py
Spot.pointing_vector
def pointing_vector(self, s, time): """ s is the spin vector in roche coordinates time is the current time """ t = time - self._t0 longitude = self._longitude + self._dlongdt * t # define the basis vectors in the spin (primed) coordinates in terms of # th...
python
def pointing_vector(self, s, time): """ s is the spin vector in roche coordinates time is the current time """ t = time - self._t0 longitude = self._longitude + self._dlongdt * t # define the basis vectors in the spin (primed) coordinates in terms of # th...
[ "def", "pointing_vector", "(", "self", ",", "s", ",", "time", ")", ":", "t", "=", "time", "-", "self", ".", "_t0", "longitude", "=", "self", ".", "_longitude", "+", "self", ".", "_dlongdt", "*", "t", "# define the basis vectors in the spin (primed) coordinates...
s is the spin vector in roche coordinates time is the current time
[ "s", "is", "the", "spin", "vector", "in", "roche", "coordinates", "time", "is", "the", "current", "time" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/backend/universe.py#L2874-L2894
phoebe-project/phoebe2
phoebe/backend/universe.py
Spot.process_teffs
def process_teffs(self, teffs, coords, s=np.array([0., 0., 1.]), t=None): """ Change the local effective temperatures for any values within the "cone" defined by the spot. Any teff within the spot will have its current value multiplied by the "relteff" factor :parameter array t...
python
def process_teffs(self, teffs, coords, s=np.array([0., 0., 1.]), t=None): """ Change the local effective temperatures for any values within the "cone" defined by the spot. Any teff within the spot will have its current value multiplied by the "relteff" factor :parameter array t...
[ "def", "process_teffs", "(", "self", ",", "teffs", ",", "coords", ",", "s", "=", "np", ".", "array", "(", "[", "0.", ",", "0.", ",", "1.", "]", ")", ",", "t", "=", "None", ")", ":", "if", "t", "is", "None", ":", "# then assume at t0", "t", "=",...
Change the local effective temperatures for any values within the "cone" defined by the spot. Any teff within the spot will have its current value multiplied by the "relteff" factor :parameter array teffs: array of teffs for computations :parameter array coords: array of coords for com...
[ "Change", "the", "local", "effective", "temperatures", "for", "any", "values", "within", "the", "cone", "defined", "by", "the", "spot", ".", "Any", "teff", "within", "the", "spot", "will", "have", "its", "current", "value", "multiplied", "by", "the", "reltef...
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/backend/universe.py#L2896-L2919
phoebe-project/phoebe2
phoebe/backend/universe.py
Pulsation.from_bundle
def from_bundle(cls, b, feature): """ Initialize a Pulsation feature from the bundle. """ feature_ps = b.get_feature(feature) freq = feature_ps.get_value('freq', unit=u.d**-1) radamp = feature_ps.get_value('radamp', unit=u.dimensionless_unscaled) l = feature_ps.g...
python
def from_bundle(cls, b, feature): """ Initialize a Pulsation feature from the bundle. """ feature_ps = b.get_feature(feature) freq = feature_ps.get_value('freq', unit=u.d**-1) radamp = feature_ps.get_value('radamp', unit=u.dimensionless_unscaled) l = feature_ps.g...
[ "def", "from_bundle", "(", "cls", ",", "b", ",", "feature", ")", ":", "feature_ps", "=", "b", ".", "get_feature", "(", "feature", ")", "freq", "=", "feature_ps", ".", "get_value", "(", "'freq'", ",", "unit", "=", "u", ".", "d", "**", "-", "1", ")",...
Initialize a Pulsation feature from the bundle.
[ "Initialize", "a", "Pulsation", "feature", "from", "the", "bundle", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/backend/universe.py#L2932-L2949
phoebe-project/phoebe2
phoebe/backend/mesh_wd.py
project_onto_potential
def project_onto_potential(r, pot_name, *args): """ TODO: add documentation """ pot = globals()[pot_name] dpdx = globals()['d%sdx'%(pot_name)] dpdy = globals()['d%sdy'%(pot_name)] dpdz = globals()['d%sdz'%(pot_name)] dpdr = globals()['d%sdr'%(pot_name)] n_iter = 0 rmag, rmag0 ...
python
def project_onto_potential(r, pot_name, *args): """ TODO: add documentation """ pot = globals()[pot_name] dpdx = globals()['d%sdx'%(pot_name)] dpdy = globals()['d%sdy'%(pot_name)] dpdz = globals()['d%sdz'%(pot_name)] dpdr = globals()['d%sdr'%(pot_name)] n_iter = 0 rmag, rmag0 ...
[ "def", "project_onto_potential", "(", "r", ",", "pot_name", ",", "*", "args", ")", ":", "pot", "=", "globals", "(", ")", "[", "pot_name", "]", "dpdx", "=", "globals", "(", ")", "[", "'d%sdx'", "%", "(", "pot_name", ")", "]", "dpdy", "=", "globals", ...
TODO: add documentation
[ "TODO", ":", "add", "documentation" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/backend/mesh_wd.py#L65-L92
phoebe-project/phoebe2
phoebe/backend/mesh_wd.py
discretize_wd_style
def discretize_wd_style(N, q, F, d, Phi): """ TODO: add documentation New implementation. I'll make this work first, then document. """ DEBUG = False Ts = [] potential = 'BinaryRoche' r0 = libphoebe.roche_pole(q, F, d, Phi) # The following is a hack that needs to go! pot_nam...
python
def discretize_wd_style(N, q, F, d, Phi): """ TODO: add documentation New implementation. I'll make this work first, then document. """ DEBUG = False Ts = [] potential = 'BinaryRoche' r0 = libphoebe.roche_pole(q, F, d, Phi) # The following is a hack that needs to go! pot_nam...
[ "def", "discretize_wd_style", "(", "N", ",", "q", ",", "F", ",", "d", ",", "Phi", ")", ":", "DEBUG", "=", "False", "Ts", "=", "[", "]", "potential", "=", "'BinaryRoche'", "r0", "=", "libphoebe", ".", "roche_pole", "(", "q", ",", "F", ",", "d", ",...
TODO: add documentation New implementation. I'll make this work first, then document.
[ "TODO", ":", "add", "documentation" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/backend/mesh_wd.py#L94-L252
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.open
def open(cls, filename): """Open a new bundle. Open a bundle from a JSON-formatted PHOEBE 2 file. This is a constructor so should be called as: >>> b = Bundle.open('test.phoebe') :parameter str filename: relative or full path to the file :return: instantiated :class:...
python
def open(cls, filename): """Open a new bundle. Open a bundle from a JSON-formatted PHOEBE 2 file. This is a constructor so should be called as: >>> b = Bundle.open('test.phoebe') :parameter str filename: relative or full path to the file :return: instantiated :class:...
[ "def", "open", "(", "cls", ",", "filename", ")", ":", "filename", "=", "os", ".", "path", ".", "expanduser", "(", "filename", ")", "logger", ".", "debug", "(", "\"importing from {}\"", ".", "format", "(", "filename", ")", ")", "f", "=", "open", "(", ...
Open a new bundle. Open a bundle from a JSON-formatted PHOEBE 2 file. This is a constructor so should be called as: >>> b = Bundle.open('test.phoebe') :parameter str filename: relative or full path to the file :return: instantiated :class:`Bundle` object
[ "Open", "a", "new", "bundle", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L183-L315
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.from_server
def from_server(cls, bundleid, server='http://localhost:5555', as_client=True): """Load a new bundle from a server. [NOT IMPLEMENTED] Load a bundle from a phoebe server. This is a constructor so should be called as: >>> b = Bundle.from_server('asdf', as_cl...
python
def from_server(cls, bundleid, server='http://localhost:5555', as_client=True): """Load a new bundle from a server. [NOT IMPLEMENTED] Load a bundle from a phoebe server. This is a constructor so should be called as: >>> b = Bundle.from_server('asdf', as_cl...
[ "def", "from_server", "(", "cls", ",", "bundleid", ",", "server", "=", "'http://localhost:5555'", ",", "as_client", "=", "True", ")", ":", "if", "not", "conf", ".", "devel", ":", "raise", "NotImplementedError", "(", "\"'from_server' not officially supported for this...
Load a new bundle from a server. [NOT IMPLEMENTED] Load a bundle from a phoebe server. This is a constructor so should be called as: >>> b = Bundle.from_server('asdf', as_client=False) :parameter str bundleid: the identifier given to the bundle by the server ...
[ "Load", "a", "new", "bundle", "from", "a", "server", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L320-L358
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.from_legacy
def from_legacy(cls, filename, add_compute_legacy=True, add_compute_phoebe=True): """Load a bundle from a PHOEBE 1.0 Legacy file. This is a constructor so should be called as: >>> b = Bundle.from_legacy('myfile.phoebe') :parameter str filename: relative or full path to the file ...
python
def from_legacy(cls, filename, add_compute_legacy=True, add_compute_phoebe=True): """Load a bundle from a PHOEBE 1.0 Legacy file. This is a constructor so should be called as: >>> b = Bundle.from_legacy('myfile.phoebe') :parameter str filename: relative or full path to the file ...
[ "def", "from_legacy", "(", "cls", ",", "filename", ",", "add_compute_legacy", "=", "True", ",", "add_compute_phoebe", "=", "True", ")", ":", "logger", ".", "warning", "(", "\"importing from legacy is experimental until official 1.0 release\"", ")", "filename", "=", "o...
Load a bundle from a PHOEBE 1.0 Legacy file. This is a constructor so should be called as: >>> b = Bundle.from_legacy('myfile.phoebe') :parameter str filename: relative or full path to the file :return: instantiated :class:`Bundle` object
[ "Load", "a", "bundle", "from", "a", "PHOEBE", "1", ".", "0", "Legacy", "file", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L382-L394
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.default_star
def default_star(cls, starA='starA', force_build=False): """ For convenience, this function is available at the top-level as <phoebe.default_star> as well as <phoebe.frontend.bundle.Bundle.default_star>. sun This is a constructor, so should be called as: >>> b = Bundle...
python
def default_star(cls, starA='starA', force_build=False): """ For convenience, this function is available at the top-level as <phoebe.default_star> as well as <phoebe.frontend.bundle.Bundle.default_star>. sun This is a constructor, so should be called as: >>> b = Bundle...
[ "def", "default_star", "(", "cls", ",", "starA", "=", "'starA'", ",", "force_build", "=", "False", ")", ":", "if", "not", "force_build", "and", "not", "conf", ".", "devel", ":", "b", "=", "cls", ".", "open", "(", "os", ".", "path", ".", "join", "("...
For convenience, this function is available at the top-level as <phoebe.default_star> as well as <phoebe.frontend.bundle.Bundle.default_star>. sun This is a constructor, so should be called as: >>> b = Bundle.default_binary() Arguments ----------- * `starA` (s...
[ "For", "convenience", "this", "function", "is", "available", "at", "the", "top", "-", "level", "as", "<phoebe", ".", "default_star", ">", "as", "well", "as", "<phoebe", ".", "frontend", ".", "bundle", ".", "Bundle", ".", "default_star", ">", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L397-L435
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.default_binary
def default_binary(cls, starA='primary', starB='secondary', orbit='binary', contact_binary=False, force_build=False): """ For convenience, this function is available at the top-level as <phoebe.default_binary> as well as <phoebe.frontend.bundle.Bundle.default_binar...
python
def default_binary(cls, starA='primary', starB='secondary', orbit='binary', contact_binary=False, force_build=False): """ For convenience, this function is available at the top-level as <phoebe.default_binary> as well as <phoebe.frontend.bundle.Bundle.default_binar...
[ "def", "default_binary", "(", "cls", ",", "starA", "=", "'primary'", ",", "starB", "=", "'secondary'", ",", "orbit", "=", "'binary'", ",", "contact_binary", "=", "False", ",", "force_build", "=", "False", ")", ":", "if", "not", "force_build", "and", "not",...
For convenience, this function is available at the top-level as <phoebe.default_binary> as well as <phoebe.frontend.bundle.Bundle.default_binary>. primary - secondary This is a constructor, so should be called as: >>> b = Bundle.default_binary() Arguments ----...
[ "For", "convenience", "this", "function", "is", "available", "at", "the", "top", "-", "level", "as", "<phoebe", ".", "default_binary", ">", "as", "well", "as", "<phoebe", ".", "frontend", ".", "bundle", ".", "Bundle", ".", "default_binary", ">", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L438-L517
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.default_triple
def default_triple(cls, inner_as_primary=True, inner_as_overcontact=False, starA='starA', starB='starB', starC='starC', inner='inner', outer='outer', contact_envelope='contact_envelope'): """Load a bundle with a default triple system. ...
python
def default_triple(cls, inner_as_primary=True, inner_as_overcontact=False, starA='starA', starB='starB', starC='starC', inner='inner', outer='outer', contact_envelope='contact_envelope'): """Load a bundle with a default triple system. ...
[ "def", "default_triple", "(", "cls", ",", "inner_as_primary", "=", "True", ",", "inner_as_overcontact", "=", "False", ",", "starA", "=", "'starA'", ",", "starB", "=", "'starB'", ",", "starC", "=", "'starC'", ",", "inner", "=", "'inner'", ",", "outer", "=",...
Load a bundle with a default triple system. Set inner_as_primary based on what hierarchical configuration you want. inner_as_primary = True: starA - starB -- starC inner_as_primary = False: starC -- starA - starB This is a constructor, so should be called as: ...
[ "Load", "a", "bundle", "with", "a", "default", "triple", "system", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L521-L578
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.save
def save(self, filename, clear_history=True, incl_uniqueid=False, compact=False): """Save the bundle to a JSON-formatted ASCII file. :parameter str filename: relative or full path to the file :parameter bool clear_history: whether to clear history log items before savin...
python
def save(self, filename, clear_history=True, incl_uniqueid=False, compact=False): """Save the bundle to a JSON-formatted ASCII file. :parameter str filename: relative or full path to the file :parameter bool clear_history: whether to clear history log items before savin...
[ "def", "save", "(", "self", ",", "filename", ",", "clear_history", "=", "True", ",", "incl_uniqueid", "=", "False", ",", "compact", "=", "False", ")", ":", "if", "clear_history", ":", "# TODO: let's not actually clear history,", "# but rather skip the context when sav...
Save the bundle to a JSON-formatted ASCII file. :parameter str filename: relative or full path to the file :parameter bool clear_history: whether to clear history log items before saving (default: True) :parameter bool incl_uniqueid: whether to including uniqueids in the ...
[ "Save", "the", "bundle", "to", "a", "JSON", "-", "formatted", "ASCII", "file", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L580-L602
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.export_legacy
def export_legacy(self, filename): """ TODO: add docs """ logger.warning("exporting to legacy is experimental until official 1.0 release") filename = os.path.expanduser(filename) return io.pass_to_legacy(self, filename)
python
def export_legacy(self, filename): """ TODO: add docs """ logger.warning("exporting to legacy is experimental until official 1.0 release") filename = os.path.expanduser(filename) return io.pass_to_legacy(self, filename)
[ "def", "export_legacy", "(", "self", ",", "filename", ")", ":", "logger", ".", "warning", "(", "\"exporting to legacy is experimental until official 1.0 release\"", ")", "filename", "=", "os", ".", "path", ".", "expanduser", "(", "filename", ")", "return", "io", "...
TODO: add docs
[ "TODO", ":", "add", "docs" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L604-L610
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle._on_socket_push_updates
def _on_socket_push_updates(self, resp): """ [NOT IMPLEMENTED] """ # TODO: check to make sure resp['meta']['bundleid']==bundleid ? # TODO: handle added parameters # TODO: handle removed (isDeleted) parameters for item in resp['data']: if item['id'] in...
python
def _on_socket_push_updates(self, resp): """ [NOT IMPLEMENTED] """ # TODO: check to make sure resp['meta']['bundleid']==bundleid ? # TODO: handle added parameters # TODO: handle removed (isDeleted) parameters for item in resp['data']: if item['id'] in...
[ "def", "_on_socket_push_updates", "(", "self", ",", "resp", ")", ":", "# TODO: check to make sure resp['meta']['bundleid']==bundleid ?", "# TODO: handle added parameters", "# TODO: handle removed (isDeleted) parameters", "for", "item", "in", "resp", "[", "'data'", "]", ":", "if...
[NOT IMPLEMENTED]
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L646-L664
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle._attach_param_from_server
def _attach_param_from_server(self, item): """ [NOT IMPLEMENTED] """ if isinstance(item, list): for itemi in item: self._attach_param_from_server(itemi) else: # then we need to add a new parameter d = item['attributes'] ...
python
def _attach_param_from_server(self, item): """ [NOT IMPLEMENTED] """ if isinstance(item, list): for itemi in item: self._attach_param_from_server(itemi) else: # then we need to add a new parameter d = item['attributes'] ...
[ "def", "_attach_param_from_server", "(", "self", ",", "item", ")", ":", "if", "isinstance", "(", "item", ",", "list", ")", ":", "for", "itemi", "in", "item", ":", "self", ".", "_attach_param_from_server", "(", "itemi", ")", "else", ":", "# then we need to ad...
[NOT IMPLEMENTED]
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L666-L680
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.as_client
def as_client(self, as_client=True, server='http://localhost:5555', bundleid=None): """ [NOT IMPLEMENTED] """ if as_client: if not _can_client: raise ImportError("dependencies to support client mode not met - see docs") server_ru...
python
def as_client(self, as_client=True, server='http://localhost:5555', bundleid=None): """ [NOT IMPLEMENTED] """ if as_client: if not _can_client: raise ImportError("dependencies to support client mode not met - see docs") server_ru...
[ "def", "as_client", "(", "self", ",", "as_client", "=", "True", ",", "server", "=", "'http://localhost:5555'", ",", "bundleid", "=", "None", ")", ":", "if", "as_client", ":", "if", "not", "_can_client", ":", "raise", "ImportError", "(", "\"dependencies to supp...
[NOT IMPLEMENTED]
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L682-L732
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.client_update
def client_update(self): """ [NOT IMPLEMENTED] """ if not self.is_client: raise ValueError("Bundle is not in client mode, cannot update") logger.info("updating client...") # wait briefly to pickup any missed messages, which should then fire # the corr...
python
def client_update(self): """ [NOT IMPLEMENTED] """ if not self.is_client: raise ValueError("Bundle is not in client mode, cannot update") logger.info("updating client...") # wait briefly to pickup any missed messages, which should then fire # the corr...
[ "def", "client_update", "(", "self", ")", ":", "if", "not", "self", ".", "is_client", ":", "raise", "ValueError", "(", "\"Bundle is not in client mode, cannot update\"", ")", "logger", ".", "info", "(", "\"updating client...\"", ")", "# wait briefly to pickup any missed...
[NOT IMPLEMENTED]
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L738-L749
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle._default_label
def _default_label(self, base, context, **kwargs): """ Determine a default label given a base label and the passed kwargs this simply counts the current number of matches on metawargs and appends that number to the base :parameter str base: the base string for the label ...
python
def _default_label(self, base, context, **kwargs): """ Determine a default label given a base label and the passed kwargs this simply counts the current number of matches on metawargs and appends that number to the base :parameter str base: the base string for the label ...
[ "def", "_default_label", "(", "self", ",", "base", ",", "context", ",", "*", "*", "kwargs", ")", ":", "kwargs", "[", "'context'", "]", "=", "context", "params", "=", "len", "(", "getattr", "(", "self", ".", "filter", "(", "check_visible", "=", "False",...
Determine a default label given a base label and the passed kwargs this simply counts the current number of matches on metawargs and appends that number to the base :parameter str base: the base string for the label :parameter str context: name of the context (where the label is going)...
[ "Determine", "a", "default", "label", "given", "a", "base", "label", "and", "the", "passed", "kwargs" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L764-L781
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_setting
def get_setting(self, twig=None, **kwargs): """ Filter in the 'setting' context :parameter str twig: the twig used for filtering :parameter **kwargs: any other tags to do the filter (except tag or context) :return: :class:`phoebe.parameters.parameters.ParameterSet` ...
python
def get_setting(self, twig=None, **kwargs): """ Filter in the 'setting' context :parameter str twig: the twig used for filtering :parameter **kwargs: any other tags to do the filter (except tag or context) :return: :class:`phoebe.parameters.parameters.ParameterSet` ...
[ "def", "get_setting", "(", "self", ",", "twig", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "twig", "is", "not", "None", ":", "kwargs", "[", "'twig'", "]", "=", "twig", "kwargs", "[", "'context'", "]", "=", "'setting'", "return", "self", ...
Filter in the 'setting' context :parameter str twig: the twig used for filtering :parameter **kwargs: any other tags to do the filter (except tag or context) :return: :class:`phoebe.parameters.parameters.ParameterSet`
[ "Filter", "in", "the", "setting", "context" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L797-L809
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle._add_history
def _add_history(self, redo_func, redo_kwargs, undo_func, undo_kwargs, **kwargs): """ Add a new log (undo/redoable) to this history context :parameter str redo_func: function to redo the action, must be a method of :class:`Bundle` :parameter dict redo_kw...
python
def _add_history(self, redo_func, redo_kwargs, undo_func, undo_kwargs, **kwargs): """ Add a new log (undo/redoable) to this history context :parameter str redo_func: function to redo the action, must be a method of :class:`Bundle` :parameter dict redo_kw...
[ "def", "_add_history", "(", "self", ",", "redo_func", ",", "redo_kwargs", ",", "undo_func", ",", "undo_kwargs", ",", "*", "*", "kwargs", ")", ":", "if", "not", "self", ".", "history_enabled", ":", "return", "param", "=", "HistoryParameter", "(", "self", ",...
Add a new log (undo/redoable) to this history context :parameter str redo_func: function to redo the action, must be a method of :class:`Bundle` :parameter dict redo_kwargs: kwargs to pass to the redo_func. Each item must be serializable (float or str, not objects) :par...
[ "Add", "a", "new", "log", "(", "undo", "/", "redoable", ")", "to", "this", "history", "context" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L811-L839
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_history
def get_history(self, i=None): """ Get a history item by index. You can toggle whether history is recorded using * :meth:`enable_history` * :meth:`disable_history` :parameter int i: integer for indexing (can be positive or negative). If i is None or...
python
def get_history(self, i=None): """ Get a history item by index. You can toggle whether history is recorded using * :meth:`enable_history` * :meth:`disable_history` :parameter int i: integer for indexing (can be positive or negative). If i is None or...
[ "def", "get_history", "(", "self", ",", "i", "=", "None", ")", ":", "ps", "=", "self", ".", "filter", "(", "context", "=", "'history'", ")", "# if not len(ps):", "# raise ValueError(\"no history recorded\")", "if", "i", "is", "not", "None", ":", "return", ...
Get a history item by index. You can toggle whether history is recorded using * :meth:`enable_history` * :meth:`disable_history` :parameter int i: integer for indexing (can be positive or negative). If i is None or not provided, the entire list of histo...
[ "Get", "a", "history", "item", "by", "index", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L853-L876
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.remove_history
def remove_history(self, i=None): """ Remove a history item from the bundle by index. You can toggle whether history is recorded using * :meth:`enable_history` * :meth:`disable_history` :parameter int i: integer for indexing (can be positive or nega...
python
def remove_history(self, i=None): """ Remove a history item from the bundle by index. You can toggle whether history is recorded using * :meth:`enable_history` * :meth:`disable_history` :parameter int i: integer for indexing (can be positive or nega...
[ "def", "remove_history", "(", "self", ",", "i", "=", "None", ")", ":", "if", "i", "is", "None", ":", "self", ".", "remove_parameters_all", "(", "context", "=", "'history'", ")", "else", ":", "param", "=", "self", ".", "get_history", "(", "i", "=", "i...
Remove a history item from the bundle by index. You can toggle whether history is recorded using * :meth:`enable_history` * :meth:`disable_history` :parameter int i: integer for indexing (can be positive or negative). If i is None or not provided, the entire list ...
[ "Remove", "a", "history", "item", "from", "the", "bundle", "by", "index", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L878-L896
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.undo
def undo(self, i=-1): """ Undo an item in the history logs :parameter int i: integer for indexing (can be positive or negative). Defaults to -1 if not provided (the latest recorded history item) :raises ValueError: if no history items have been recorded ...
python
def undo(self, i=-1): """ Undo an item in the history logs :parameter int i: integer for indexing (can be positive or negative). Defaults to -1 if not provided (the latest recorded history item) :raises ValueError: if no history items have been recorded ...
[ "def", "undo", "(", "self", ",", "i", "=", "-", "1", ")", ":", "_history_enabled", "=", "self", ".", "history_enabled", "param", "=", "self", ".", "get_history", "(", "i", ")", "self", ".", "disable_history", "(", ")", "param", ".", "undo", "(", ")",...
Undo an item in the history logs :parameter int i: integer for indexing (can be positive or negative). Defaults to -1 if not provided (the latest recorded history item) :raises ValueError: if no history items have been recorded
[ "Undo", "an", "item", "in", "the", "history", "logs" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L936-L953
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.set_hierarchy
def set_hierarchy(self, *args, **kwargs): """ Set the hierarchy of the system. See tutorial on building a system. TODO: provide documentation args can be - string representation (preferably passed through hierarchy already) - func and strings/PSs/params to pass ...
python
def set_hierarchy(self, *args, **kwargs): """ Set the hierarchy of the system. See tutorial on building a system. TODO: provide documentation args can be - string representation (preferably passed through hierarchy already) - func and strings/PSs/params to pass ...
[ "def", "set_hierarchy", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "self", ".", "_import_before_v211", ":", "raise", "ValueError", "(", "\"This bundle was created before constraints in solar units were supported and therefore cannot call set_hie...
Set the hierarchy of the system. See tutorial on building a system. TODO: provide documentation args can be - string representation (preferably passed through hierarchy already) - func and strings/PSs/params to pass to function
[ "Set", "the", "hierarchy", "of", "the", "system", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1031-L1343
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_system
def get_system(self, twig=None, **kwargs): """ Filter in the 'system' context :parameter str twig: twig to use for filtering :parameter **kwargs: any other tags to do the filter (except twig or context) :return: :class:`phoebe.parameters.parameters.Parameter` or ...
python
def get_system(self, twig=None, **kwargs): """ Filter in the 'system' context :parameter str twig: twig to use for filtering :parameter **kwargs: any other tags to do the filter (except twig or context) :return: :class:`phoebe.parameters.parameters.Parameter` or ...
[ "def", "get_system", "(", "self", ",", "twig", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "twig", "is", "not", "None", ":", "kwargs", "[", "'twig'", "]", "=", "twig", "kwargs", "[", "'context'", "]", "=", "'system'", "return", "self", "....
Filter in the 'system' context :parameter str twig: twig to use for filtering :parameter **kwargs: any other tags to do the filter (except twig or context) :return: :class:`phoebe.parameters.parameters.Parameter` or :class:`phoebe.parameters.parameters.ParameterSet`
[ "Filter", "in", "the", "system", "context" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1345-L1359
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.run_checks
def run_checks(self, **kwargs): """ Check to see whether the system is expected to be computable. This is called by default for each set_value but will only raise a logger warning if fails. This is also called immediately when calling :meth:`run_compute`. kwargs are pa...
python
def run_checks(self, **kwargs): """ Check to see whether the system is expected to be computable. This is called by default for each set_value but will only raise a logger warning if fails. This is also called immediately when calling :meth:`run_compute`. kwargs are pa...
[ "def", "run_checks", "(", "self", ",", "*", "*", "kwargs", ")", ":", "# make sure all constraints have been run", "changed_params", "=", "self", ".", "run_delayed_constraints", "(", ")", "hier", "=", "self", ".", "hierarchy", "if", "hier", "is", "None", ":", "...
Check to see whether the system is expected to be computable. This is called by default for each set_value but will only raise a logger warning if fails. This is also called immediately when calling :meth:`run_compute`. kwargs are passed to override currently set values as if they wer...
[ "Check", "to", "see", "whether", "the", "system", "is", "expected", "to", "be", "computable", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1451-L1668
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.add_feature
def add_feature(self, kind, component=None, **kwargs): """ Add a new feature (spot, etc) to a component in the system. If not provided, 'feature' (the name of the new feature) will be created for you and can be accessed by the 'feature' attribute of the returned ParameterSet ...
python
def add_feature(self, kind, component=None, **kwargs): """ Add a new feature (spot, etc) to a component in the system. If not provided, 'feature' (the name of the new feature) will be created for you and can be accessed by the 'feature' attribute of the returned ParameterSet ...
[ "def", "add_feature", "(", "self", ",", "kind", ",", "component", "=", "None", ",", "*", "*", "kwargs", ")", ":", "func", "=", "_get_add_func", "(", "_feature", ",", "kind", ")", "if", "kwargs", ".", "get", "(", "'feature'", ",", "False", ")", "is", ...
Add a new feature (spot, etc) to a component in the system. If not provided, 'feature' (the name of the new feature) will be created for you and can be accessed by the 'feature' attribute of the returned ParameterSet >>> b.add_feature(feature.spot, component='mystar') or ...
[ "Add", "a", "new", "feature", "(", "spot", "etc", ")", "to", "a", "component", "in", "the", "system", ".", "If", "not", "provided", "feature", "(", "the", "name", "of", "the", "new", "feature", ")", "will", "be", "created", "for", "you", "and", "can"...
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1670-L1748
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_feature
def get_feature(self, feature=None, **kwargs): """ Filter in the 'proerty' context :parameter str feature: name of the feature (optional) :parameter **kwargs: any other tags to do the filter (except component or context) :return: :class:`phoebe.parameters.parameters....
python
def get_feature(self, feature=None, **kwargs): """ Filter in the 'proerty' context :parameter str feature: name of the feature (optional) :parameter **kwargs: any other tags to do the filter (except component or context) :return: :class:`phoebe.parameters.parameters....
[ "def", "get_feature", "(", "self", ",", "feature", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "feature", "is", "not", "None", ":", "kwargs", "[", "'feature'", "]", "=", "feature", "kwargs", "[", "'context'", "]", "=", "'feature'", "return", ...
Filter in the 'proerty' context :parameter str feature: name of the feature (optional) :parameter **kwargs: any other tags to do the filter (except component or context) :return: :class:`phoebe.parameters.parameters.ParameterSet`
[ "Filter", "in", "the", "proerty", "context" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1750-L1762
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.remove_feature
def remove_feature(self, feature=None, **kwargs): """ [NOT IMPLEMENTED] Remove a 'feature' from the bundle :raises NotImplementedError: because this isn't implemented yet """ self._kwargs_checks(kwargs) # Let's avoid deleting ALL features from the matching cont...
python
def remove_feature(self, feature=None, **kwargs): """ [NOT IMPLEMENTED] Remove a 'feature' from the bundle :raises NotImplementedError: because this isn't implemented yet """ self._kwargs_checks(kwargs) # Let's avoid deleting ALL features from the matching cont...
[ "def", "remove_feature", "(", "self", ",", "feature", "=", "None", ",", "*", "*", "kwargs", ")", ":", "self", ".", "_kwargs_checks", "(", "kwargs", ")", "# Let's avoid deleting ALL features from the matching contexts", "if", "feature", "is", "None", "and", "not", ...
[NOT IMPLEMENTED] Remove a 'feature' from the bundle :raises NotImplementedError: because this isn't implemented yet
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1764-L1794
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.rename_feature
def rename_feature(self, old_feature, new_feature): """ Change the label of a feature attached to the Bundle :parameter str old_feature: the current name of the feature (must exist) :parameter str new_feature: the desired new name of the feature (must not exist) ...
python
def rename_feature(self, old_feature, new_feature): """ Change the label of a feature attached to the Bundle :parameter str old_feature: the current name of the feature (must exist) :parameter str new_feature: the desired new name of the feature (must not exist) ...
[ "def", "rename_feature", "(", "self", ",", "old_feature", ",", "new_feature", ")", ":", "# TODO: raise error if old_feature not found?", "self", ".", "_check_label", "(", "new_feature", ")", "self", ".", "_rename_label", "(", "'feature'", ",", "old_feature", ",", "n...
Change the label of a feature attached to the Bundle :parameter str old_feature: the current name of the feature (must exist) :parameter str new_feature: the desired new name of the feature (must not exist) :return: None :raises ValueError: if the new_feature is ...
[ "Change", "the", "label", "of", "a", "feature", "attached", "to", "the", "Bundle" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1803-L1817
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.add_spot
def add_spot(self, component=None, feature=None, **kwargs): """ Shortcut to :meth:`add_feature` but with kind='spot' """ if component is None: if len(self.hierarchy.get_stars())==1: component = self.hierarchy.get_stars()[0] else: ra...
python
def add_spot(self, component=None, feature=None, **kwargs): """ Shortcut to :meth:`add_feature` but with kind='spot' """ if component is None: if len(self.hierarchy.get_stars())==1: component = self.hierarchy.get_stars()[0] else: ra...
[ "def", "add_spot", "(", "self", ",", "component", "=", "None", ",", "feature", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "component", "is", "None", ":", "if", "len", "(", "self", ".", "hierarchy", ".", "get_stars", "(", ")", ")", "==", ...
Shortcut to :meth:`add_feature` but with kind='spot'
[ "Shortcut", "to", ":", "meth", ":", "add_feature", "but", "with", "kind", "=", "spot" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1819-L1831
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_spot
def get_spot(self, feature=None, **kwargs): """ Shortcut to :meth:`get_feature` but with kind='spot' """ kwargs.setdefault('kind', 'spot') return self.get_feature(feature, **kwargs)
python
def get_spot(self, feature=None, **kwargs): """ Shortcut to :meth:`get_feature` but with kind='spot' """ kwargs.setdefault('kind', 'spot') return self.get_feature(feature, **kwargs)
[ "def", "get_spot", "(", "self", ",", "feature", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", ".", "setdefault", "(", "'kind'", ",", "'spot'", ")", "return", "self", ".", "get_feature", "(", "feature", ",", "*", "*", "kwargs", ")" ]
Shortcut to :meth:`get_feature` but with kind='spot'
[ "Shortcut", "to", ":", "meth", ":", "get_feature", "but", "with", "kind", "=", "spot" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1833-L1838
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.remove_spot
def remove_spot(self, feature=None, **kwargs): """ [NOT IMPLEMENTED] Shortcut to :meth:`remove_feature` but with kind='spot' """ kwargs.setdefault('kind', 'spot') return self.remove_feature(feature, **kwargs)
python
def remove_spot(self, feature=None, **kwargs): """ [NOT IMPLEMENTED] Shortcut to :meth:`remove_feature` but with kind='spot' """ kwargs.setdefault('kind', 'spot') return self.remove_feature(feature, **kwargs)
[ "def", "remove_spot", "(", "self", ",", "feature", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", ".", "setdefault", "(", "'kind'", ",", "'spot'", ")", "return", "self", ".", "remove_feature", "(", "feature", ",", "*", "*", "kwargs", ")" ]
[NOT IMPLEMENTED] Shortcut to :meth:`remove_feature` but with kind='spot'
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1840-L1847
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.add_component
def add_component(self, kind, **kwargs): """ Add a new component (star or orbit) to the system. If not provided, 'component' (the name of the new star or orbit) will be created for you and can be accessed by the 'component' attribute of the returned ParameterSet. >>> b....
python
def add_component(self, kind, **kwargs): """ Add a new component (star or orbit) to the system. If not provided, 'component' (the name of the new star or orbit) will be created for you and can be accessed by the 'component' attribute of the returned ParameterSet. >>> b....
[ "def", "add_component", "(", "self", ",", "kind", ",", "*", "*", "kwargs", ")", ":", "func", "=", "_get_add_func", "(", "component", ",", "kind", ")", "if", "kwargs", ".", "get", "(", "'component'", ",", "False", ")", "is", "None", ":", "# then we want...
Add a new component (star or orbit) to the system. If not provided, 'component' (the name of the new star or orbit) will be created for you and can be accessed by the 'component' attribute of the returned ParameterSet. >>> b.add_component(component.star) or >>> b.add_...
[ "Add", "a", "new", "component", "(", "star", "or", "orbit", ")", "to", "the", "system", ".", "If", "not", "provided", "component", "(", "the", "name", "of", "the", "new", "star", "or", "orbit", ")", "will", "be", "created", "for", "you", "and", "can"...
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1849-L1919
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_component
def get_component(self, component=None, **kwargs): """ Filter in the 'component' context :parameter str component: name of the component (optional) :parameter **kwargs: any other tags to do the filter (except component or context) :return: :class:`phoebe.parameters.p...
python
def get_component(self, component=None, **kwargs): """ Filter in the 'component' context :parameter str component: name of the component (optional) :parameter **kwargs: any other tags to do the filter (except component or context) :return: :class:`phoebe.parameters.p...
[ "def", "get_component", "(", "self", ",", "component", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "component", "is", "not", "None", ":", "kwargs", "[", "'component'", "]", "=", "component", "kwargs", "[", "'context'", "]", "=", "'component'", ...
Filter in the 'component' context :parameter str component: name of the component (optional) :parameter **kwargs: any other tags to do the filter (except component or context) :return: :class:`phoebe.parameters.parameters.ParameterSet`
[ "Filter", "in", "the", "component", "context" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1921-L1933
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.remove_component
def remove_component(self, component, **kwargs): """ [NOT IMPLEMENTED] Remove a 'component' from the bundle :raises NotImplementedError: because this isn't implemented yet """ # NOTE: run_checks will check if an entry is in the hierarchy but has no parameters kw...
python
def remove_component(self, component, **kwargs): """ [NOT IMPLEMENTED] Remove a 'component' from the bundle :raises NotImplementedError: because this isn't implemented yet """ # NOTE: run_checks will check if an entry is in the hierarchy but has no parameters kw...
[ "def", "remove_component", "(", "self", ",", "component", ",", "*", "*", "kwargs", ")", ":", "# NOTE: run_checks will check if an entry is in the hierarchy but has no parameters", "kwargs", "[", "'component'", "]", "=", "component", "# NOTE: we do not remove from 'model' by def...
[NOT IMPLEMENTED] Remove a 'component' from the bundle :raises NotImplementedError: because this isn't implemented yet
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1935-L1947
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.rename_component
def rename_component(self, old_component, new_component): """ Change the label of a component attached to the Bundle :parameter str old_component: the current name of the component (must exist) :parameter str new_component: the desired new name of the component (...
python
def rename_component(self, old_component, new_component): """ Change the label of a component attached to the Bundle :parameter str old_component: the current name of the component (must exist) :parameter str new_component: the desired new name of the component (...
[ "def", "rename_component", "(", "self", ",", "old_component", ",", "new_component", ")", ":", "# TODO: raise error if old_component not found?", "# even though _rename_tag will call _check_label again, we should", "# do it first so that we can raise any errors BEFORE we start messing", "# ...
Change the label of a component attached to the Bundle :parameter str old_component: the current name of the component (must exist) :parameter str new_component: the desired new name of the component (must not exist) :return: None :raises ValueError: if the new_c...
[ "Change", "the", "label", "of", "a", "component", "attached", "to", "the", "Bundle" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1949-L1974
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.add_orbit
def add_orbit(self, component=None, **kwargs): """ Shortcut to :meth:`add_component` but with kind='orbit' """ kwargs.setdefault('component', component) return self.add_component('orbit', **kwargs)
python
def add_orbit(self, component=None, **kwargs): """ Shortcut to :meth:`add_component` but with kind='orbit' """ kwargs.setdefault('component', component) return self.add_component('orbit', **kwargs)
[ "def", "add_orbit", "(", "self", ",", "component", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", ".", "setdefault", "(", "'component'", ",", "component", ")", "return", "self", ".", "add_component", "(", "'orbit'", ",", "*", "*", "kwargs", ...
Shortcut to :meth:`add_component` but with kind='orbit'
[ "Shortcut", "to", ":", "meth", ":", "add_component", "but", "with", "kind", "=", "orbit" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1976-L1981
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_orbit
def get_orbit(self, component=None, **kwargs): """ Shortcut to :meth:`get_component` but with kind='star' """ kwargs.setdefault('kind', 'orbit') return self.get_component(component, **kwargs)
python
def get_orbit(self, component=None, **kwargs): """ Shortcut to :meth:`get_component` but with kind='star' """ kwargs.setdefault('kind', 'orbit') return self.get_component(component, **kwargs)
[ "def", "get_orbit", "(", "self", ",", "component", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", ".", "setdefault", "(", "'kind'", ",", "'orbit'", ")", "return", "self", ".", "get_component", "(", "component", ",", "*", "*", "kwargs", ")" ]
Shortcut to :meth:`get_component` but with kind='star'
[ "Shortcut", "to", ":", "meth", ":", "get_component", "but", "with", "kind", "=", "star" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1983-L1988
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.remove_orbit
def remove_orbit(self, component=None, **kwargs): """ [NOT IMPLEMENTED] Shortcut to :meth:`remove_component` but with kind='star' """ kwargs.setdefault('kind', 'orbit') return self.remove_component(component, **kwargs)
python
def remove_orbit(self, component=None, **kwargs): """ [NOT IMPLEMENTED] Shortcut to :meth:`remove_component` but with kind='star' """ kwargs.setdefault('kind', 'orbit') return self.remove_component(component, **kwargs)
[ "def", "remove_orbit", "(", "self", ",", "component", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", ".", "setdefault", "(", "'kind'", ",", "'orbit'", ")", "return", "self", ".", "remove_component", "(", "component", ",", "*", "*", "kwargs", ...
[NOT IMPLEMENTED] Shortcut to :meth:`remove_component` but with kind='star'
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1990-L1997
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.add_star
def add_star(self, component=None, **kwargs): """ Shortcut to :meth:`add_component` but with kind='star' """ kwargs.setdefault('component', component) return self.add_component('star', **kwargs)
python
def add_star(self, component=None, **kwargs): """ Shortcut to :meth:`add_component` but with kind='star' """ kwargs.setdefault('component', component) return self.add_component('star', **kwargs)
[ "def", "add_star", "(", "self", ",", "component", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", ".", "setdefault", "(", "'component'", ",", "component", ")", "return", "self", ".", "add_component", "(", "'star'", ",", "*", "*", "kwargs", ")...
Shortcut to :meth:`add_component` but with kind='star'
[ "Shortcut", "to", ":", "meth", ":", "add_component", "but", "with", "kind", "=", "star" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L1999-L2004
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_star
def get_star(self, component=None, **kwargs): """ Shortcut to :meth:`get_component` but with kind='star' """ kwargs.setdefault('kind', 'star') return self.get_component(component, **kwargs)
python
def get_star(self, component=None, **kwargs): """ Shortcut to :meth:`get_component` but with kind='star' """ kwargs.setdefault('kind', 'star') return self.get_component(component, **kwargs)
[ "def", "get_star", "(", "self", ",", "component", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", ".", "setdefault", "(", "'kind'", ",", "'star'", ")", "return", "self", ".", "get_component", "(", "component", ",", "*", "*", "kwargs", ")" ]
Shortcut to :meth:`get_component` but with kind='star'
[ "Shortcut", "to", ":", "meth", ":", "get_component", "but", "with", "kind", "=", "star" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2006-L2011
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.remove_star
def remove_star(self, component=None, **kwargs): """ [NOT IMPLEMENTED] Shortcut to :meth:`remove_component` but with kind='star' """ kwargs.setdefault('kind', 'star') return self.remove_component(component, **kwargs)
python
def remove_star(self, component=None, **kwargs): """ [NOT IMPLEMENTED] Shortcut to :meth:`remove_component` but with kind='star' """ kwargs.setdefault('kind', 'star') return self.remove_component(component, **kwargs)
[ "def", "remove_star", "(", "self", ",", "component", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", ".", "setdefault", "(", "'kind'", ",", "'star'", ")", "return", "self", ".", "remove_component", "(", "component", ",", "*", "*", "kwargs", "...
[NOT IMPLEMENTED] Shortcut to :meth:`remove_component` but with kind='star'
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2013-L2020
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.add_envelope
def add_envelope(self, component=None, **kwargs): """ [NOT SUPPORTED] Shortcut to :meth:`add_component` but with kind='envelope' """ kwargs.setdefault('component', component) return self.add_component('envelope', **kwargs)
python
def add_envelope(self, component=None, **kwargs): """ [NOT SUPPORTED] Shortcut to :meth:`add_component` but with kind='envelope' """ kwargs.setdefault('component', component) return self.add_component('envelope', **kwargs)
[ "def", "add_envelope", "(", "self", ",", "component", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", ".", "setdefault", "(", "'component'", ",", "component", ")", "return", "self", ".", "add_component", "(", "'envelope'", ",", "*", "*", "kwarg...
[NOT SUPPORTED] Shortcut to :meth:`add_component` but with kind='envelope'
[ "[", "NOT", "SUPPORTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2022-L2029
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_envelope
def get_envelope(self, component=None, **kwargs): """ [NOT SUPPORTED] Shortcut to :meth:`get_component` but with kind='envelope' """ kwargs.setdefault('kind', 'envelope') return self.get_component(component, **kwargs)
python
def get_envelope(self, component=None, **kwargs): """ [NOT SUPPORTED] Shortcut to :meth:`get_component` but with kind='envelope' """ kwargs.setdefault('kind', 'envelope') return self.get_component(component, **kwargs)
[ "def", "get_envelope", "(", "self", ",", "component", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", ".", "setdefault", "(", "'kind'", ",", "'envelope'", ")", "return", "self", ".", "get_component", "(", "component", ",", "*", "*", "kwargs", ...
[NOT SUPPORTED] Shortcut to :meth:`get_component` but with kind='envelope'
[ "[", "NOT", "SUPPORTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2031-L2038
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.remove_envelope
def remove_envelope(self, component=None, **kwargs): """ [NOT SUPPORTED] [NOT IMPLEMENTED] Shortcut to :meth:`remove_component` but with kind='envelope' """ kwargs.setdefault('kind', 'envelope') return self.remove_component(component, **kwargs)
python
def remove_envelope(self, component=None, **kwargs): """ [NOT SUPPORTED] [NOT IMPLEMENTED] Shortcut to :meth:`remove_component` but with kind='envelope' """ kwargs.setdefault('kind', 'envelope') return self.remove_component(component, **kwargs)
[ "def", "remove_envelope", "(", "self", ",", "component", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", ".", "setdefault", "(", "'kind'", ",", "'envelope'", ")", "return", "self", ".", "remove_component", "(", "component", ",", "*", "*", "kwar...
[NOT SUPPORTED] [NOT IMPLEMENTED] Shortcut to :meth:`remove_component` but with kind='envelope'
[ "[", "NOT", "SUPPORTED", "]", "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2040-L2048
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_ephemeris
def get_ephemeris(self, component=None, t0='t0_supconj', **kwargs): """ Get the ephemeris of a component (star or orbit) :parameter str component: name of the component. If not given, component will default to the top-most level of the current hierarchy :paramet...
python
def get_ephemeris(self, component=None, t0='t0_supconj', **kwargs): """ Get the ephemeris of a component (star or orbit) :parameter str component: name of the component. If not given, component will default to the top-most level of the current hierarchy :paramet...
[ "def", "get_ephemeris", "(", "self", ",", "component", "=", "None", ",", "t0", "=", "'t0_supconj'", ",", "*", "*", "kwargs", ")", ":", "if", "component", "is", "None", ":", "component", "=", "self", ".", "hierarchy", ".", "get_top", "(", ")", "if", "...
Get the ephemeris of a component (star or orbit) :parameter str component: name of the component. If not given, component will default to the top-most level of the current hierarchy :parameter t0: qualifier of the parameter to be used for t0 :type t0: str :param...
[ "Get", "the", "ephemeris", "of", "a", "component", "(", "star", "or", "orbit", ")" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2050-L2095
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.to_phase
def to_phase(self, time, component=None, t0='t0_supconj', **kwargs): """ Get the phase(s) of a time(s) for a given ephemeris :parameter time: time to convert to phases (should be in same system as t0s) :type time: float, list, or array :parameter t0: qualifier of the...
python
def to_phase(self, time, component=None, t0='t0_supconj', **kwargs): """ Get the phase(s) of a time(s) for a given ephemeris :parameter time: time to convert to phases (should be in same system as t0s) :type time: float, list, or array :parameter t0: qualifier of the...
[ "def", "to_phase", "(", "self", ",", "time", ",", "component", "=", "None", ",", "t0", "=", "'t0_supconj'", ",", "*", "*", "kwargs", ")", ":", "if", "kwargs", ".", "get", "(", "'shift'", ",", "False", ")", ":", "raise", "ValueError", "(", "\"support ...
Get the phase(s) of a time(s) for a given ephemeris :parameter time: time to convert to phases (should be in same system as t0s) :type time: float, list, or array :parameter t0: qualifier of the parameter to be used for t0 :type t0: str :parameter str component: comp...
[ "Get", "the", "phase", "(", "s", ")", "of", "a", "time", "(", "s", ")", "for", "a", "given", "ephemeris" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2097-L2143
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.to_time
def to_time(self, phase, component=None, t0='t0_supconj', **kwargs): """ Get the time(s) of a phase(s) for a given ephemeris :parameter phase: phase to convert to times (should be in same system as t0s) :type phase: float, list, or array ` :parameter str component: com...
python
def to_time(self, phase, component=None, t0='t0_supconj', **kwargs): """ Get the time(s) of a phase(s) for a given ephemeris :parameter phase: phase to convert to times (should be in same system as t0s) :type phase: float, list, or array ` :parameter str component: com...
[ "def", "to_time", "(", "self", ",", "phase", ",", "component", "=", "None", ",", "t0", "=", "'t0_supconj'", ",", "*", "*", "kwargs", ")", ":", "if", "kwargs", ".", "get", "(", "'shift'", ",", "False", ")", ":", "raise", "ValueError", "(", "\"support ...
Get the time(s) of a phase(s) for a given ephemeris :parameter phase: phase to convert to times (should be in same system as t0s) :type phase: float, list, or array ` :parameter str component: component for which to get the ephemeris. If not given, component will default t...
[ "Get", "the", "time", "(", "s", ")", "of", "a", "phase", "(", "s", ")", "for", "a", "given", "ephemeris" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2145-L2181
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.add_dataset
def add_dataset(self, kind, component=None, **kwargs): """ Add a new dataset to the bundle. If not provided, 'dataset' (the name of the new dataset) will be created for you and can be accessed by the 'dataset' attribute of the returned ParameterSet. For light curves, th...
python
def add_dataset(self, kind, component=None, **kwargs): """ Add a new dataset to the bundle. If not provided, 'dataset' (the name of the new dataset) will be created for you and can be accessed by the 'dataset' attribute of the returned ParameterSet. For light curves, th...
[ "def", "add_dataset", "(", "self", ",", "kind", ",", "component", "=", "None", ",", "*", "*", "kwargs", ")", ":", "sing_plural", "=", "{", "}", "sing_plural", "[", "'time'", "]", "=", "'times'", "sing_plural", "[", "'flux'", "]", "=", "'fluxes'", "sing...
Add a new dataset to the bundle. If not provided, 'dataset' (the name of the new dataset) will be created for you and can be accessed by the 'dataset' attribute of the returned ParameterSet. For light curves, the light curve will be generated for the entire system. For radial ...
[ "Add", "a", "new", "dataset", "to", "the", "bundle", ".", "If", "not", "provided", "dataset", "(", "the", "name", "of", "the", "new", "dataset", ")", "will", "be", "created", "for", "you", "and", "can", "be", "accessed", "by", "the", "dataset", "attrib...
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2183-L2408
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_dataset
def get_dataset(self, dataset=None, **kwargs): """ Filter in the 'dataset' context :parameter str dataset: name of the dataset (optional) :parameter **kwargs: any other tags to do the filter (except dataset or context) :return: :class:`phoebe.parameters.parameters.Pa...
python
def get_dataset(self, dataset=None, **kwargs): """ Filter in the 'dataset' context :parameter str dataset: name of the dataset (optional) :parameter **kwargs: any other tags to do the filter (except dataset or context) :return: :class:`phoebe.parameters.parameters.Pa...
[ "def", "get_dataset", "(", "self", ",", "dataset", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "dataset", "is", "not", "None", ":", "kwargs", "[", "'dataset'", "]", "=", "dataset", "kwargs", "[", "'context'", "]", "=", "'dataset'", "if", "'...
Filter in the 'dataset' context :parameter str dataset: name of the dataset (optional) :parameter **kwargs: any other tags to do the filter (except dataset or context) :return: :class:`phoebe.parameters.parameters.ParameterSet`
[ "Filter", "in", "the", "dataset", "context" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2410-L2427
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.remove_dataset
def remove_dataset(self, dataset=None, **kwargs): """ Remove a dataset from the Bundle. This removes all matching Parameters from the dataset, model, and constraint contexts (by default if the context tag is not provided). You must provide some sort of filter or this will raise an Erro...
python
def remove_dataset(self, dataset=None, **kwargs): """ Remove a dataset from the Bundle. This removes all matching Parameters from the dataset, model, and constraint contexts (by default if the context tag is not provided). You must provide some sort of filter or this will raise an Erro...
[ "def", "remove_dataset", "(", "self", ",", "dataset", "=", "None", ",", "*", "*", "kwargs", ")", ":", "self", ".", "_kwargs_checks", "(", "kwargs", ")", "# Let's avoid deleting ALL parameters from the matching contexts", "if", "dataset", "is", "None", "and", "not"...
Remove a dataset from the Bundle. This removes all matching Parameters from the dataset, model, and constraint contexts (by default if the context tag is not provided). You must provide some sort of filter or this will raise an Error (so that all Parameters are not accidentally removed...
[ "Remove", "a", "dataset", "from", "the", "Bundle", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2429-L2502
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.rename_dataset
def rename_dataset(self, old_dataset, new_dataset): """ Change the label of a dataset attached to the Bundle :parameter str old_dataset: the current name of the dataset (must exist) :parameter str new_dataset: the desired new name of the dataset (must not exist) ...
python
def rename_dataset(self, old_dataset, new_dataset): """ Change the label of a dataset attached to the Bundle :parameter str old_dataset: the current name of the dataset (must exist) :parameter str new_dataset: the desired new name of the dataset (must not exist) ...
[ "def", "rename_dataset", "(", "self", ",", "old_dataset", ",", "new_dataset", ")", ":", "# TODO: raise error if old_component not found?", "self", ".", "_check_label", "(", "new_dataset", ")", "self", ".", "_rename_label", "(", "'dataset'", ",", "old_dataset", ",", ...
Change the label of a dataset attached to the Bundle :parameter str old_dataset: the current name of the dataset (must exist) :parameter str new_dataset: the desired new name of the dataset (must not exist) :return: None :raises ValueError: if the new_dataset is ...
[ "Change", "the", "label", "of", "a", "dataset", "attached", "to", "the", "Bundle" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2511-L2526
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.enable_dataset
def enable_dataset(self, dataset=None, **kwargs): """ Enable a 'dataset'. Datasets that are enabled will be computed during :meth:`run_compute` and included in the cost function during :meth:`run_fitting`. If compute is not provided, the dataset will be enabled across all ...
python
def enable_dataset(self, dataset=None, **kwargs): """ Enable a 'dataset'. Datasets that are enabled will be computed during :meth:`run_compute` and included in the cost function during :meth:`run_fitting`. If compute is not provided, the dataset will be enabled across all ...
[ "def", "enable_dataset", "(", "self", ",", "dataset", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", "[", "'context'", "]", "=", "'compute'", "kwargs", "[", "'dataset'", "]", "=", "dataset", "kwargs", "[", "'qualifier'", "]", "=", "'enabled'",...
Enable a 'dataset'. Datasets that are enabled will be computed during :meth:`run_compute` and included in the cost function during :meth:`run_fitting`. If compute is not provided, the dataset will be enabled across all compute options. :parameter str dataset: name of the datas...
[ "Enable", "a", "dataset", ".", "Datasets", "that", "are", "enabled", "will", "be", "computed", "during", ":", "meth", ":", "run_compute", "and", "included", "in", "the", "cost", "function", "during", ":", "meth", ":", "run_fitting", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2529-L2554
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.disable_dataset
def disable_dataset(self, dataset=None, **kwargs): """ Disable a 'dataset'. Datasets that are enabled will be computed during :meth:`run_compute` and included in the cost function during :meth:`run_fitting`. If compute is not provided, the dataset will be disabled across all ...
python
def disable_dataset(self, dataset=None, **kwargs): """ Disable a 'dataset'. Datasets that are enabled will be computed during :meth:`run_compute` and included in the cost function during :meth:`run_fitting`. If compute is not provided, the dataset will be disabled across all ...
[ "def", "disable_dataset", "(", "self", ",", "dataset", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", "[", "'context'", "]", "=", "'compute'", "kwargs", "[", "'dataset'", "]", "=", "dataset", "kwargs", "[", "'qualifier'", "]", "=", "'enabled'"...
Disable a 'dataset'. Datasets that are enabled will be computed during :meth:`run_compute` and included in the cost function during :meth:`run_fitting`. If compute is not provided, the dataset will be disabled across all compute options. :parameter str dataset: name of the dat...
[ "Disable", "a", "dataset", ".", "Datasets", "that", "are", "enabled", "will", "be", "computed", "during", ":", "meth", ":", "run_compute", "and", "included", "in", "the", "cost", "function", "during", ":", "meth", ":", "run_fitting", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2556-L2581
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.add_constraint
def add_constraint(self, *args, **kwargs): """ TODO: add documentation args can be string representation (length 1) func and strings to pass to function """ # TODO: be smart enough to take kwargs (especially for undoing a # remove_constraint) for kind, value (exp...
python
def add_constraint(self, *args, **kwargs): """ TODO: add documentation args can be string representation (length 1) func and strings to pass to function """ # TODO: be smart enough to take kwargs (especially for undoing a # remove_constraint) for kind, value (exp...
[ "def", "add_constraint", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# TODO: be smart enough to take kwargs (especially for undoing a", "# remove_constraint) for kind, value (expression),", "redo_kwargs", "=", "deepcopy", "(", "kwargs", ")", "if", "...
TODO: add documentation args can be string representation (length 1) func and strings to pass to function
[ "TODO", ":", "add", "documentation" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2594-L2695
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_constraint
def get_constraint(self, twig=None, **kwargs): """ Filter in the 'constraint' context :parameter str constraint: name of the constraint (optional) :parameter **kwargs: any other tags to do the filter (except constraint or context) :return: :class:`phoebe.parameters.p...
python
def get_constraint(self, twig=None, **kwargs): """ Filter in the 'constraint' context :parameter str constraint: name of the constraint (optional) :parameter **kwargs: any other tags to do the filter (except constraint or context) :return: :class:`phoebe.parameters.p...
[ "def", "get_constraint", "(", "self", ",", "twig", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "twig", "is", "not", "None", ":", "kwargs", "[", "'twig'", "]", "=", "twig", "kwargs", "[", "'context'", "]", "=", "'constraint'", "return", "sel...
Filter in the 'constraint' context :parameter str constraint: name of the constraint (optional) :parameter **kwargs: any other tags to do the filter (except constraint or context) :return: :class:`phoebe.parameters.parameters.ParameterSet`
[ "Filter", "in", "the", "constraint", "context" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2698-L2710
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.remove_constraint
def remove_constraint(self, twig=None, **kwargs): """ Remove a 'constraint' from the bundle :parameter str twig: twig to filter for the constraint :parameter **kwargs: any other tags to do the filter (except twig or context) """ # let's run delayed constraint...
python
def remove_constraint(self, twig=None, **kwargs): """ Remove a 'constraint' from the bundle :parameter str twig: twig to filter for the constraint :parameter **kwargs: any other tags to do the filter (except twig or context) """ # let's run delayed constraint...
[ "def", "remove_constraint", "(", "self", ",", "twig", "=", "None", ",", "*", "*", "kwargs", ")", ":", "# let's run delayed constraints first to ensure that we get the same", "# results in interactive and non-interactive modes as well as to make", "# sure we don't have delayed constra...
Remove a 'constraint' from the bundle :parameter str twig: twig to filter for the constraint :parameter **kwargs: any other tags to do the filter (except twig or context)
[ "Remove", "a", "constraint", "from", "the", "bundle" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2712-L2751
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.flip_constraint
def flip_constraint(self, twig=None, solve_for=None, **kwargs): """ Flip an existing constraint to solve for a different parameter :parameter str twig: twig to filter the constraint :parameter solve_for: twig or actual parameter object of the new parameter which this constra...
python
def flip_constraint(self, twig=None, solve_for=None, **kwargs): """ Flip an existing constraint to solve for a different parameter :parameter str twig: twig to filter the constraint :parameter solve_for: twig or actual parameter object of the new parameter which this constra...
[ "def", "flip_constraint", "(", "self", ",", "twig", "=", "None", ",", "solve_for", "=", "None", ",", "*", "*", "kwargs", ")", ":", "self", ".", "_kwargs_checks", "(", "kwargs", ",", "additional_allowed_keys", "=", "[", "'check_nan'", "]", ")", "kwargs", ...
Flip an existing constraint to solve for a different parameter :parameter str twig: twig to filter the constraint :parameter solve_for: twig or actual parameter object of the new parameter which this constraint should constraint (solve for). :type solve_for: str or :class:`phoebe.pa...
[ "Flip", "an", "existing", "constraint", "to", "solve", "for", "a", "different", "parameter" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2754-L2797
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.run_constraint
def run_constraint(self, twig=None, return_parameter=False, **kwargs): """ Run a given 'constraint' now and set the value of the constrained parameter. In general, there shouldn't be any need to manually call this - constraints should automatically be run whenever a dependent pa...
python
def run_constraint(self, twig=None, return_parameter=False, **kwargs): """ Run a given 'constraint' now and set the value of the constrained parameter. In general, there shouldn't be any need to manually call this - constraints should automatically be run whenever a dependent pa...
[ "def", "run_constraint", "(", "self", ",", "twig", "=", "None", ",", "return_parameter", "=", "False", ",", "*", "*", "kwargs", ")", ":", "if", "not", "kwargs", ".", "get", "(", "'skip_kwargs_checks'", ",", "False", ")", ":", "self", ".", "_kwargs_checks...
Run a given 'constraint' now and set the value of the constrained parameter. In general, there shouldn't be any need to manually call this - constraints should automatically be run whenever a dependent parameter's value is change. :parameter str twig: twig to filter for the constraint ...
[ "Run", "a", "given", "constraint", "now", "and", "set", "the", "value", "of", "the", "constrained", "parameter", ".", "In", "general", "there", "shouldn", "t", "be", "any", "need", "to", "manually", "call", "this", "-", "constraints", "should", "automaticall...
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2799-L2851
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.compute_pblums
def compute_pblums(self, compute=None, **kwargs): """ Compute the passband luminosities that will be applied to the system, following all coupling, etc, as well as all relevant compute options (ntriangles, distortion_method, etc). The exposed passband luminosities (and any coupl...
python
def compute_pblums(self, compute=None, **kwargs): """ Compute the passband luminosities that will be applied to the system, following all coupling, etc, as well as all relevant compute options (ntriangles, distortion_method, etc). The exposed passband luminosities (and any coupl...
[ "def", "compute_pblums", "(", "self", ",", "compute", "=", "None", ",", "*", "*", "kwargs", ")", ":", "datasets", "=", "kwargs", ".", "pop", "(", "'dataset'", ",", "self", ".", "datasets", ")", "components", "=", "kwargs", ".", "pop", "(", "'component'...
Compute the passband luminosities that will be applied to the system, following all coupling, etc, as well as all relevant compute options (ntriangles, distortion_method, etc). The exposed passband luminosities (and any coupling) are computed at t0@system. This method is only for conve...
[ "Compute", "the", "passband", "luminosities", "that", "will", "be", "applied", "to", "the", "system", "following", "all", "coupling", "etc", "as", "well", "as", "all", "relevant", "compute", "options", "(", "ntriangles", "distortion_method", "etc", ")", ".", "...
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2864-L2911
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.add_compute
def add_compute(self, kind=compute.phoebe, **kwargs): """ Add a set of computeoptions for a given backend to the bundle. The label ('compute') can then be sent to :meth:`run_compute`. If not provided, 'compute' will be created for you and can be accessed by the 'compute' attribu...
python
def add_compute(self, kind=compute.phoebe, **kwargs): """ Add a set of computeoptions for a given backend to the bundle. The label ('compute') can then be sent to :meth:`run_compute`. If not provided, 'compute' will be created for you and can be accessed by the 'compute' attribu...
[ "def", "add_compute", "(", "self", ",", "kind", "=", "compute", ".", "phoebe", ",", "*", "*", "kwargs", ")", ":", "func", "=", "_get_add_func", "(", "_compute", ",", "kind", ")", "kwargs", ".", "setdefault", "(", "'compute'", ",", "self", ".", "_defaul...
Add a set of computeoptions for a given backend to the bundle. The label ('compute') can then be sent to :meth:`run_compute`. If not provided, 'compute' will be created for you and can be accessed by the 'compute' attribute of the returned ParameterSet. Available kinds include:...
[ "Add", "a", "set", "of", "computeoptions", "for", "a", "given", "backend", "to", "the", "bundle", ".", "The", "label", "(", "compute", ")", "can", "then", "be", "sent", "to", ":", "meth", ":", "run_compute", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2913-L2975
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_compute
def get_compute(self, compute=None, **kwargs): """ Filter in the 'compute' context :parameter str compute: name of the compute options (optional) :parameter **kwargs: any other tags to do the filter (except compute or context) :return: :class:`phoebe.parameters.param...
python
def get_compute(self, compute=None, **kwargs): """ Filter in the 'compute' context :parameter str compute: name of the compute options (optional) :parameter **kwargs: any other tags to do the filter (except compute or context) :return: :class:`phoebe.parameters.param...
[ "def", "get_compute", "(", "self", ",", "compute", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "compute", "is", "not", "None", ":", "kwargs", "[", "'compute'", "]", "=", "compute", "kwargs", "[", "'context'", "]", "=", "'compute'", "return", ...
Filter in the 'compute' context :parameter str compute: name of the compute options (optional) :parameter **kwargs: any other tags to do the filter (except compute or context) :return: :class:`phoebe.parameters.parameters.ParameterSet`
[ "Filter", "in", "the", "compute", "context" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2977-L2989
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.remove_compute
def remove_compute(self, compute, **kwargs): """ Remove a 'compute' from the bundle :parameter str compute: name of the compute options :parameter **kwargs: any other tags to do the filter (except twig or context) :raise NotImplementedError: because it isn't ...
python
def remove_compute(self, compute, **kwargs): """ Remove a 'compute' from the bundle :parameter str compute: name of the compute options :parameter **kwargs: any other tags to do the filter (except twig or context) :raise NotImplementedError: because it isn't ...
[ "def", "remove_compute", "(", "self", ",", "compute", ",", "*", "*", "kwargs", ")", ":", "kwargs", "[", "'compute'", "]", "=", "compute", "kwargs", "[", "'context'", "]", "=", "'comute'", "self", ".", "remove_parameters_all", "(", "*", "*", "kwargs", ")"...
Remove a 'compute' from the bundle :parameter str compute: name of the compute options :parameter **kwargs: any other tags to do the filter (except twig or context) :raise NotImplementedError: because it isn't
[ "Remove", "a", "compute", "from", "the", "bundle" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L2991-L3002
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.rename_compute
def rename_compute(self, old_compute, new_compute): """ Change the label of a compute attached to the Bundle :parameter str old_compute: the current name of the compute options (must exist) :parameter str new_compute: the desired new name of the compute options (...
python
def rename_compute(self, old_compute, new_compute): """ Change the label of a compute attached to the Bundle :parameter str old_compute: the current name of the compute options (must exist) :parameter str new_compute: the desired new name of the compute options (...
[ "def", "rename_compute", "(", "self", ",", "old_compute", ",", "new_compute", ")", ":", "# TODO: raise error if old_compute not found?", "self", ".", "_check_label", "(", "new_compute", ")", "self", ".", "_rename_label", "(", "'compute'", ",", "old_compute", ",", "n...
Change the label of a compute attached to the Bundle :parameter str old_compute: the current name of the compute options (must exist) :parameter str new_compute: the desired new name of the compute options (must not exist) :return: None :raises ValueError: if the...
[ "Change", "the", "label", "of", "a", "compute", "attached", "to", "the", "Bundle" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L3011-L3025
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.run_compute
def run_compute(self, compute=None, model=None, detach=False, times=None, **kwargs): """ Run a forward model of the system on the enabled dataset using a specified set of compute options. To attach and set custom values for compute options, including choosing ...
python
def run_compute(self, compute=None, model=None, detach=False, times=None, **kwargs): """ Run a forward model of the system on the enabled dataset using a specified set of compute options. To attach and set custom values for compute options, including choosing ...
[ "def", "run_compute", "(", "self", ",", "compute", "=", "None", ",", "model", "=", "None", ",", "detach", "=", "False", ",", "times", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "isinstance", "(", "detach", ",", "str", ")", ":", "# then w...
Run a forward model of the system on the enabled dataset using a specified set of compute options. To attach and set custom values for compute options, including choosing which backend to use, see: * :meth:`add_compute` To define the dataset types and times at which the mod...
[ "Run", "a", "forward", "model", "of", "the", "system", "on", "the", "enabled", "dataset", "using", "a", "specified", "set", "of", "compute", "options", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L3029-L3304
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_model
def get_model(self, model=None, **kwargs): """ Filter in the 'model' context :parameter str model: name of the model (optional) :parameter **kwargs: any other tags to do the filter (except model or context) :return: :class:`phoebe.parameters.parameters.ParameterSet` ...
python
def get_model(self, model=None, **kwargs): """ Filter in the 'model' context :parameter str model: name of the model (optional) :parameter **kwargs: any other tags to do the filter (except model or context) :return: :class:`phoebe.parameters.parameters.ParameterSet` ...
[ "def", "get_model", "(", "self", ",", "model", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "model", "is", "not", "None", ":", "kwargs", "[", "'model'", "]", "=", "model", "kwargs", "[", "'context'", "]", "=", "'model'", "return", "self", ...
Filter in the 'model' context :parameter str model: name of the model (optional) :parameter **kwargs: any other tags to do the filter (except model or context) :return: :class:`phoebe.parameters.parameters.ParameterSet`
[ "Filter", "in", "the", "model", "context" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L3306-L3318
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.remove_model
def remove_model(self, model, **kwargs): """ Remove a 'model' from the bundle :parameter str twig: twig to filter for the model :parameter **kwargs: any other tags to do the filter (except twig or context) """ kwargs['model'] = model kwargs['context']...
python
def remove_model(self, model, **kwargs): """ Remove a 'model' from the bundle :parameter str twig: twig to filter for the model :parameter **kwargs: any other tags to do the filter (except twig or context) """ kwargs['model'] = model kwargs['context']...
[ "def", "remove_model", "(", "self", ",", "model", ",", "*", "*", "kwargs", ")", ":", "kwargs", "[", "'model'", "]", "=", "model", "kwargs", "[", "'context'", "]", "=", "'model'", "self", ".", "remove_parameters_all", "(", "*", "*", "kwargs", ")" ]
Remove a 'model' from the bundle :parameter str twig: twig to filter for the model :parameter **kwargs: any other tags to do the filter (except twig or context)
[ "Remove", "a", "model", "from", "the", "bundle" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L3320-L3330
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.rename_model
def rename_model(self, old_model, new_model): """ Change the label of a model attached to the Bundle :parameter str old_model: the current name of the model (must exist) :parameter str new_model: the desired new name of the model (must not exist) :return:...
python
def rename_model(self, old_model, new_model): """ Change the label of a model attached to the Bundle :parameter str old_model: the current name of the model (must exist) :parameter str new_model: the desired new name of the model (must not exist) :return:...
[ "def", "rename_model", "(", "self", ",", "old_model", ",", "new_model", ")", ":", "# TODO: raise error if old_feature not found?", "self", ".", "_check_label", "(", "new_model", ")", "self", ".", "_rename_label", "(", "'model'", ",", "old_model", ",", "new_model", ...
Change the label of a model attached to the Bundle :parameter str old_model: the current name of the model (must exist) :parameter str new_model: the desired new name of the model (must not exist) :return: None :raises ValueError: if the new_model is forbidden
[ "Change", "the", "label", "of", "a", "model", "attached", "to", "the", "Bundle" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L3339-L3353
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.add_prior
def add_prior(self, twig=None, **kwargs): """ [NOT IMPLEMENTED] :raises NotImplementedError: because it isn't """ raise NotImplementedError param = self.get_parameter(twig=twig, **kwargs) # TODO: make sure param is a float parameter? func = _get_add_fu...
python
def add_prior(self, twig=None, **kwargs): """ [NOT IMPLEMENTED] :raises NotImplementedError: because it isn't """ raise NotImplementedError param = self.get_parameter(twig=twig, **kwargs) # TODO: make sure param is a float parameter? func = _get_add_fu...
[ "def", "add_prior", "(", "self", ",", "twig", "=", "None", ",", "*", "*", "kwargs", ")", ":", "raise", "NotImplementedError", "param", "=", "self", ".", "get_parameter", "(", "twig", "=", "twig", ",", "*", "*", "kwargs", ")", "# TODO: make sure param is a ...
[NOT IMPLEMENTED] :raises NotImplementedError: because it isn't
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L3357-L3389
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_prior
def get_prior(self, twig=None, **kwargs): """ [NOT IMPLEMENTED] :raises NotImplementedError: because it isn't """ raise NotImplementedError kwargs['context'] = 'prior' return self.filter(twig=twig, **kwargs)
python
def get_prior(self, twig=None, **kwargs): """ [NOT IMPLEMENTED] :raises NotImplementedError: because it isn't """ raise NotImplementedError kwargs['context'] = 'prior' return self.filter(twig=twig, **kwargs)
[ "def", "get_prior", "(", "self", ",", "twig", "=", "None", ",", "*", "*", "kwargs", ")", ":", "raise", "NotImplementedError", "kwargs", "[", "'context'", "]", "=", "'prior'", "return", "self", ".", "filter", "(", "twig", "=", "twig", ",", "*", "*", "...
[NOT IMPLEMENTED] :raises NotImplementedError: because it isn't
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L3391-L3399
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_fitting
def get_fitting(self, fitting=None, **kwargs): """ [NOT IMPLEMENTED] :raises NotImplementedError: because it isn't """ raise NotImplementedError if fitting is not None: kwargs['fitting'] = fitting kwargs['context'] = 'fitting' return self.filt...
python
def get_fitting(self, fitting=None, **kwargs): """ [NOT IMPLEMENTED] :raises NotImplementedError: because it isn't """ raise NotImplementedError if fitting is not None: kwargs['fitting'] = fitting kwargs['context'] = 'fitting' return self.filt...
[ "def", "get_fitting", "(", "self", ",", "fitting", "=", "None", ",", "*", "*", "kwargs", ")", ":", "raise", "NotImplementedError", "if", "fitting", "is", "not", "None", ":", "kwargs", "[", "'fitting'", "]", "=", "fitting", "kwargs", "[", "'context'", "]"...
[NOT IMPLEMENTED] :raises NotImplementedError: because it isn't
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L3445-L3455
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_posterior
def get_posterior(self, twig=None, feedback=None, **kwargs): """ [NOT IMPLEMENTED] :raises NotImplementedError: because it isn't """ raise NotImplementedError kwargs['context'] = 'posterior' return self.filter(twig=twig, **kwargs)
python
def get_posterior(self, twig=None, feedback=None, **kwargs): """ [NOT IMPLEMENTED] :raises NotImplementedError: because it isn't """ raise NotImplementedError kwargs['context'] = 'posterior' return self.filter(twig=twig, **kwargs)
[ "def", "get_posterior", "(", "self", ",", "twig", "=", "None", ",", "feedback", "=", "None", ",", "*", "*", "kwargs", ")", ":", "raise", "NotImplementedError", "kwargs", "[", "'context'", "]", "=", "'posterior'", "return", "self", ".", "filter", "(", "tw...
[NOT IMPLEMENTED] :raises NotImplementedError: because it isn't
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L3477-L3485
phoebe-project/phoebe2
phoebe/frontend/bundle.py
Bundle.get_feedback
def get_feedback(self, feedback=None, **kwargs): """ [NOT IMPLEMENTED] :raises NotImplementedError: because it isn't """ raise NotImplementedError if feedback is not None: kwargs['feedback'] = feedback kwargs['context'] = 'feedback' return sel...
python
def get_feedback(self, feedback=None, **kwargs): """ [NOT IMPLEMENTED] :raises NotImplementedError: because it isn't """ raise NotImplementedError if feedback is not None: kwargs['feedback'] = feedback kwargs['context'] = 'feedback' return sel...
[ "def", "get_feedback", "(", "self", ",", "feedback", "=", "None", ",", "*", "*", "kwargs", ")", ":", "raise", "NotImplementedError", "if", "feedback", "is", "not", "None", ":", "kwargs", "[", "'feedback'", "]", "=", "feedback", "kwargs", "[", "'context'", ...
[NOT IMPLEMENTED] :raises NotImplementedError: because it isn't
[ "[", "NOT", "IMPLEMENTED", "]" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/frontend/bundle.py#L3517-L3527
phoebe-project/phoebe2
phoebe/parameters/twighelpers.py
_twig_to_uniqueid
def _twig_to_uniqueid(bundle, twig, **kwargs): """ kwargs are passed on to filter """ res = bundle.filter(twig=twig, force_ps=True, check_visible=False, check_default=False, **kwargs) # we force_ps instead of checking is_instance(res, ParameterSet) to avoid # having to import from parameters ...
python
def _twig_to_uniqueid(bundle, twig, **kwargs): """ kwargs are passed on to filter """ res = bundle.filter(twig=twig, force_ps=True, check_visible=False, check_default=False, **kwargs) # we force_ps instead of checking is_instance(res, ParameterSet) to avoid # having to import from parameters ...
[ "def", "_twig_to_uniqueid", "(", "bundle", ",", "twig", ",", "*", "*", "kwargs", ")", ":", "res", "=", "bundle", ".", "filter", "(", "twig", "=", "twig", ",", "force_ps", "=", "True", ",", "check_visible", "=", "False", ",", "check_default", "=", "Fals...
kwargs are passed on to filter
[ "kwargs", "are", "passed", "on", "to", "filter" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/parameters/twighelpers.py#L10-L21
phoebe-project/phoebe2
phoebe/constraints/expression.py
ConstraintVar.update_user_label
def update_user_label(self): """ finds this parameter and gets the least_unique_twig from the bundle """ self._user_label = _uniqueid_to_uniquetwig(self._bundle, self.unique_label) self._set_curly_label()
python
def update_user_label(self): """ finds this parameter and gets the least_unique_twig from the bundle """ self._user_label = _uniqueid_to_uniquetwig(self._bundle, self.unique_label) self._set_curly_label()
[ "def", "update_user_label", "(", "self", ")", ":", "self", ".", "_user_label", "=", "_uniqueid_to_uniquetwig", "(", "self", ".", "_bundle", ",", "self", ".", "unique_label", ")", "self", ".", "_set_curly_label", "(", ")" ]
finds this parameter and gets the least_unique_twig from the bundle
[ "finds", "this", "parameter", "and", "gets", "the", "least_unique_twig", "from", "the", "bundle" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/constraints/expression.py#L53-L59
phoebe-project/phoebe2
phoebe/constraints/expression.py
ConstraintVar.get_parameter
def get_parameter(self): """ get the parameter object from the system for this var needs to be backend safe (not passing or storing bundle) """ if not self.is_param: raise ValueError("this var does not point to a parameter") # this is quite expensive, so let...
python
def get_parameter(self): """ get the parameter object from the system for this var needs to be backend safe (not passing or storing bundle) """ if not self.is_param: raise ValueError("this var does not point to a parameter") # this is quite expensive, so let...
[ "def", "get_parameter", "(", "self", ")", ":", "if", "not", "self", ".", "is_param", ":", "raise", "ValueError", "(", "\"this var does not point to a parameter\"", ")", "# this is quite expensive, so let's cache the parameter object so we only", "# have to filter on the first tim...
get the parameter object from the system for this var needs to be backend safe (not passing or storing bundle)
[ "get", "the", "parameter", "object", "from", "the", "system", "for", "this", "var" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/constraints/expression.py#L82-L96
phoebe-project/phoebe2
phoebe/dependencies/autofig/axes.py
_process_dimension_kwargs
def _process_dimension_kwargs(direction, kwargs): """ process kwargs for AxDimension instances by stripping off the prefix for the appropriate direction """ acceptable_keys = ['unit', 'pad', 'lim', 'label'] # if direction in ['s']: # acceptable_keys += ['mode'] processed_kwargs = {} ...
python
def _process_dimension_kwargs(direction, kwargs): """ process kwargs for AxDimension instances by stripping off the prefix for the appropriate direction """ acceptable_keys = ['unit', 'pad', 'lim', 'label'] # if direction in ['s']: # acceptable_keys += ['mode'] processed_kwargs = {} ...
[ "def", "_process_dimension_kwargs", "(", "direction", ",", "kwargs", ")", ":", "acceptable_keys", "=", "[", "'unit'", ",", "'pad'", ",", "'lim'", ",", "'label'", "]", "# if direction in ['s']:", "# acceptable_keys += ['mode']", "processed_kwargs", "=", "{", "}", "fo...
process kwargs for AxDimension instances by stripping off the prefix for the appropriate direction
[ "process", "kwargs", "for", "AxDimension", "instances", "by", "stripping", "off", "the", "prefix", "for", "the", "appropriate", "direction" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/dependencies/autofig/axes.py#L1249-L1267
phoebe-project/phoebe2
phoebe/dependencies/autofig/axes.py
Axes.calls_sorted
def calls_sorted(self): """ calls sorted in z """ def _z(call): if isinstance(call.z.value, np.ndarray): return np.mean(call.z.value.flatten()) elif isinstance(call.z.value, float) or isinstance(call.z.value, int): return call.z.val...
python
def calls_sorted(self): """ calls sorted in z """ def _z(call): if isinstance(call.z.value, np.ndarray): return np.mean(call.z.value.flatten()) elif isinstance(call.z.value, float) or isinstance(call.z.value, int): return call.z.val...
[ "def", "calls_sorted", "(", "self", ")", ":", "def", "_z", "(", "call", ")", ":", "if", "isinstance", "(", "call", ".", "z", ".", "value", ",", "np", ".", "ndarray", ")", ":", "return", "np", ".", "mean", "(", "call", ".", "z", ".", "value", "....
calls sorted in z
[ "calls", "sorted", "in", "z" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/dependencies/autofig/axes.py#L145-L163
phoebe-project/phoebe2
phoebe/dependencies/autofig/axes.py
Axes.consistent_with_call
def consistent_with_call(self, call): """ check to see if a new call would be consistent to add to this Axes instance checks include: * compatible units in all directions * compatible independent-variable (if applicable) """ if len(self.calls) == 0: r...
python
def consistent_with_call(self, call): """ check to see if a new call would be consistent to add to this Axes instance checks include: * compatible units in all directions * compatible independent-variable (if applicable) """ if len(self.calls) == 0: r...
[ "def", "consistent_with_call", "(", "self", ",", "call", ")", ":", "if", "len", "(", "self", ".", "calls", ")", "==", "0", ":", "return", "True", ",", "''", "msg", "=", "[", "]", "if", "not", "_consistent_allow_none", "(", "call", ".", "_axorder", ",...
check to see if a new call would be consistent to add to this Axes instance checks include: * compatible units in all directions * compatible independent-variable (if applicable)
[ "check", "to", "see", "if", "a", "new", "call", "would", "be", "consistent", "to", "add", "to", "this", "Axes", "instance" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/dependencies/autofig/axes.py#L388-L443
phoebe-project/phoebe2
phoebe/dependencies/autofig/axes.py
AxDimension.lim
def lim(self, lim): """ set lim (limits) """ if lim is None: self._lim = lim return typeerror_msg = "lim must be of type tuple, float, None, or in ['fixed', 'symmetric', 'frame', 'sliding']" if isinstance(lim, str): if lim in ['fixed'...
python
def lim(self, lim): """ set lim (limits) """ if lim is None: self._lim = lim return typeerror_msg = "lim must be of type tuple, float, None, or in ['fixed', 'symmetric', 'frame', 'sliding']" if isinstance(lim, str): if lim in ['fixed'...
[ "def", "lim", "(", "self", ",", "lim", ")", ":", "if", "lim", "is", "None", ":", "self", ".", "_lim", "=", "lim", "return", "typeerror_msg", "=", "\"lim must be of type tuple, float, None, or in ['fixed', 'symmetric', 'frame', 'sliding']\"", "if", "isinstance", "(", ...
set lim (limits)
[ "set", "lim", "(", "limits", ")" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/dependencies/autofig/axes.py#L1185-L1224
phoebe-project/phoebe2
phoebe/dependencies/autofig/axes.py
AxView.get_value
def get_value(self, i, indeps=None): """ access the interpolated value at a give value of i (independent-variable) if indeps is not passed, then the entire range of indeps over all calls is assumed """ if self.value is None: return None if i is None: ...
python
def get_value(self, i, indeps=None): """ access the interpolated value at a give value of i (independent-variable) if indeps is not passed, then the entire range of indeps over all calls is assumed """ if self.value is None: return None if i is None: ...
[ "def", "get_value", "(", "self", ",", "i", ",", "indeps", "=", "None", ")", ":", "if", "self", ".", "value", "is", "None", ":", "return", "None", "if", "i", "is", "None", ":", "return", "np", ".", "median", "(", "self", ".", "value", ")", "if", ...
access the interpolated value at a give value of i (independent-variable) if indeps is not passed, then the entire range of indeps over all calls is assumed
[ "access", "the", "interpolated", "value", "at", "a", "give", "value", "of", "i", "(", "independent", "-", "variable", ")" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/dependencies/autofig/axes.py#L1558-L1579
phoebe-project/phoebe2
phoebe/parameters/system.py
system
def system(**kwargs): """ Generally, this will automatically be added to a newly initialized :class:`phoebe.frontend.bundle.Bundle` :parameter **kwargs: defaults for the values of any of the parameters :return: a :class:`phoebe.parameters.parameters.ParameterSet` of all newly created :class...
python
def system(**kwargs): """ Generally, this will automatically be added to a newly initialized :class:`phoebe.frontend.bundle.Bundle` :parameter **kwargs: defaults for the values of any of the parameters :return: a :class:`phoebe.parameters.parameters.ParameterSet` of all newly created :class...
[ "def", "system", "(", "*", "*", "kwargs", ")", ":", "params", "=", "[", "]", "params", "+=", "[", "FloatParameter", "(", "qualifier", "=", "'t0'", ",", "value", "=", "kwargs", ".", "get", "(", "'t0'", ",", "0.0", ")", ",", "default_unit", "=", "u",...
Generally, this will automatically be added to a newly initialized :class:`phoebe.frontend.bundle.Bundle` :parameter **kwargs: defaults for the values of any of the parameters :return: a :class:`phoebe.parameters.parameters.ParameterSet` of all newly created :class:`phoebe.parameters.parameters.Par...
[ "Generally", "this", "will", "automatically", "be", "added", "to", "a", "newly", "initialized", ":", "class", ":", "phoebe", ".", "frontend", ".", "bundle", ".", "Bundle" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/parameters/system.py#L7-L30
pinax/pinax-teams
pinax/teams/utils.py
create_teams
def create_teams(obj, user, access): """ Will create new teams associated with the referenced obj and set the resulting relation to the correct attribute. The naming convention for team foreign keys is pluralname_team (for example, instructors_team). This function will take the access dictiona...
python
def create_teams(obj, user, access): """ Will create new teams associated with the referenced obj and set the resulting relation to the correct attribute. The naming convention for team foreign keys is pluralname_team (for example, instructors_team). This function will take the access dictiona...
[ "def", "create_teams", "(", "obj", ",", "user", ",", "access", ")", ":", "for", "field_name", ",", "access_types", "in", "access", ".", "items", "(", ")", ":", "id_field", "=", "\"{}_id\"", ".", "format", "(", "field_name", ")", "# Check that the team is ass...
Will create new teams associated with the referenced obj and set the resulting relation to the correct attribute. The naming convention for team foreign keys is pluralname_team (for example, instructors_team). This function will take the access dictionary and apply the specified access types as fo...
[ "Will", "create", "new", "teams", "associated", "with", "the", "referenced", "obj", "and", "set", "the", "resulting", "relation", "to", "the", "correct", "attribute", "." ]
train
https://github.com/pinax/pinax-teams/blob/f8354ba0d32b3979d1dc18f50d23fd0096445ab7/pinax/teams/utils.py#L4-L43
phoebe-project/phoebe2
phoebe/parameters/hierarchy.py
_to_component
def _to_component(obj, allow_hierarchy=True): """ takes either a string, ParameterSet, Parameter, or the string representation (component or nested hierarchy) """ def _to_str(obj): return "{}:{}".format(obj.kind, obj.component) if isinstance(obj, str): # TODO: check to see if valid...
python
def _to_component(obj, allow_hierarchy=True): """ takes either a string, ParameterSet, Parameter, or the string representation (component or nested hierarchy) """ def _to_str(obj): return "{}:{}".format(obj.kind, obj.component) if isinstance(obj, str): # TODO: check to see if valid...
[ "def", "_to_component", "(", "obj", ",", "allow_hierarchy", "=", "True", ")", ":", "def", "_to_str", "(", "obj", ")", ":", "return", "\"{}:{}\"", ".", "format", "(", "obj", ".", "kind", ",", "obj", ".", "component", ")", "if", "isinstance", "(", "obj",...
takes either a string, ParameterSet, Parameter, or the string representation (component or nested hierarchy)
[ "takes", "either", "a", "string", "ParameterSet", "Parameter", "or", "the", "string", "representation", "(", "component", "or", "nested", "hierarchy", ")" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/parameters/hierarchy.py#L4-L34
phoebe-project/phoebe2
phoebe/parameters/hierarchy.py
binaryorbit
def binaryorbit(orbit, comp1, comp2, envelope=None): """ Build the string representation of a hierarchy containing a binary orbit with 2 components. Generally, this will be used as an input to the kind argument in :meth:`phoebe.frontend.bundle.Bundle.set_hierarchy` :parameter comp1: an existin...
python
def binaryorbit(orbit, comp1, comp2, envelope=None): """ Build the string representation of a hierarchy containing a binary orbit with 2 components. Generally, this will be used as an input to the kind argument in :meth:`phoebe.frontend.bundle.Bundle.set_hierarchy` :parameter comp1: an existin...
[ "def", "binaryorbit", "(", "orbit", ",", "comp1", ",", "comp2", ",", "envelope", "=", "None", ")", ":", "if", "envelope", ":", "return", "'{}({}, {}, {})'", ".", "format", "(", "_to_component", "(", "orbit", ",", "False", ")", ",", "_to_component", "(", ...
Build the string representation of a hierarchy containing a binary orbit with 2 components. Generally, this will be used as an input to the kind argument in :meth:`phoebe.frontend.bundle.Bundle.set_hierarchy` :parameter comp1: an existing hierarchy string, Parameter, or ParameterSet :parameter com...
[ "Build", "the", "string", "representation", "of", "a", "hierarchy", "containing", "a", "binary", "orbit", "with", "2", "components", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/parameters/hierarchy.py#L37-L53
phoebe-project/phoebe2
phoebe/backend/oc_geometry.py
nekmin
def nekmin(omega_in,q,x0=0.5,z0=0.5): '''Computes the position of the neck (minimal radius) in an contact_binary star1''' def Omega_xz(q,x,z): return 1./np.sqrt(x**2+z**2)+q/np.sqrt((1-x)**2+z**2)+(q+1)*x**2/2.-q*x def Omega_xy(q,x,y): return 1./np.sqrt(x**2+y**2)+q/np.sqrt((1-x)**2+y**2)...
python
def nekmin(omega_in,q,x0=0.5,z0=0.5): '''Computes the position of the neck (minimal radius) in an contact_binary star1''' def Omega_xz(q,x,z): return 1./np.sqrt(x**2+z**2)+q/np.sqrt((1-x)**2+z**2)+(q+1)*x**2/2.-q*x def Omega_xy(q,x,y): return 1./np.sqrt(x**2+y**2)+q/np.sqrt((1-x)**2+y**2)...
[ "def", "nekmin", "(", "omega_in", ",", "q", ",", "x0", "=", "0.5", ",", "z0", "=", "0.5", ")", ":", "def", "Omega_xz", "(", "q", ",", "x", ",", "z", ")", ":", "return", "1.", "/", "np", ".", "sqrt", "(", "x", "**", "2", "+", "z", "**", "2...
Computes the position of the neck (minimal radius) in an contact_binary star1
[ "Computes", "the", "position", "of", "the", "neck", "(", "minimal", "radius", ")", "in", "an", "contact_binary", "star1" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/backend/oc_geometry.py#L118-L184
phoebe-project/phoebe2
phoebe/backend/oc_geometry.py
compute_frac_areas
def compute_frac_areas(new_mesh,xmin): '''Computes fractional areas belonging to each triangle vertex that are a result of the intersection with the neck plane and assigns them to each vertex per triangle.''' def intersection(point1,point2,xmin): ''' point1 = (x1,y1,z1), point2 = (x2,y2,z2 ...
python
def compute_frac_areas(new_mesh,xmin): '''Computes fractional areas belonging to each triangle vertex that are a result of the intersection with the neck plane and assigns them to each vertex per triangle.''' def intersection(point1,point2,xmin): ''' point1 = (x1,y1,z1), point2 = (x2,y2,z2 ...
[ "def", "compute_frac_areas", "(", "new_mesh", ",", "xmin", ")", ":", "def", "intersection", "(", "point1", ",", "point2", ",", "xmin", ")", ":", "''' point1 = (x1,y1,z1), point2 = (x2,y2,z2\n parameters for matrices: a1=(z2-z1)/(x2-x1), b1=0, c1=-1, d1=z1-(z2-z1)/(x2-x1)*x...
Computes fractional areas belonging to each triangle vertex that are a result of the intersection with the neck plane and assigns them to each vertex per triangle.
[ "Computes", "fractional", "areas", "belonging", "to", "each", "triangle", "vertex", "that", "are", "a", "result", "of", "the", "intersection", "with", "the", "neck", "plane", "and", "assigns", "them", "to", "each", "vertex", "per", "triangle", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/backend/oc_geometry.py#L186-L300
phoebe-project/phoebe2
phoebe/parameters/component.py
orbit
def orbit(component, **kwargs): """ Create parameters for a new orbit. Generally, this will be used as an input to the kind argument in :meth:`phoebe.frontend.bundle.Bundle.add_component` :parameter **kwargs: defaults for the values of any of the parameters :return: a :class:`phoebe.parameters...
python
def orbit(component, **kwargs): """ Create parameters for a new orbit. Generally, this will be used as an input to the kind argument in :meth:`phoebe.frontend.bundle.Bundle.add_component` :parameter **kwargs: defaults for the values of any of the parameters :return: a :class:`phoebe.parameters...
[ "def", "orbit", "(", "component", ",", "*", "*", "kwargs", ")", ":", "params", "=", "[", "]", "#~ params += [ObjrefParameter(value=component)]", "params", "+=", "[", "FloatParameter", "(", "qualifier", "=", "'period'", ",", "timederiv", "=", "'dpdt'", ",", "va...
Create parameters for a new orbit. Generally, this will be used as an input to the kind argument in :meth:`phoebe.frontend.bundle.Bundle.add_component` :parameter **kwargs: defaults for the values of any of the parameters :return: a :class:`phoebe.parameters.parameters.ParameterSet` of all newly ...
[ "Create", "parameters", "for", "a", "new", "orbit", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/parameters/component.py#L20-L69
phoebe-project/phoebe2
phoebe/parameters/component.py
star
def star(component, **kwargs): """ Create parameters for a new star. Generally, this will be used as an input to the kind argument in :meth:`phoebe.frontend.bundle.Bundle.add_component` :parameter **kwargs: defaults for the values of any of the parameters :return: a :class:`phoebe.parameters.p...
python
def star(component, **kwargs): """ Create parameters for a new star. Generally, this will be used as an input to the kind argument in :meth:`phoebe.frontend.bundle.Bundle.add_component` :parameter **kwargs: defaults for the values of any of the parameters :return: a :class:`phoebe.parameters.p...
[ "def", "star", "(", "component", ",", "*", "*", "kwargs", ")", ":", "params", "=", "[", "]", "#~ params += [ObjrefParameter(value=component)]", "params", "+=", "[", "FloatParameter", "(", "qualifier", "=", "'requiv'", ",", "value", "=", "kwargs", ".", "get", ...
Create parameters for a new star. Generally, this will be used as an input to the kind argument in :meth:`phoebe.frontend.bundle.Bundle.add_component` :parameter **kwargs: defaults for the values of any of the parameters :return: a :class:`phoebe.parameters.parameters.ParameterSet` of all newly ...
[ "Create", "parameters", "for", "a", "new", "star", "." ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/parameters/component.py#L72-L134
phoebe-project/phoebe2
phoebe/parameters/component.py
envelope
def envelope(component, **kwargs): """ Create parameters for an envelope (usually will be attached to two stars solRad that they can share a common-envelope) Generally, this will be used as an input to the kind argument in :meth:`phoebe.frontend.bundle.Bundle.add_component` :parameter **kw...
python
def envelope(component, **kwargs): """ Create parameters for an envelope (usually will be attached to two stars solRad that they can share a common-envelope) Generally, this will be used as an input to the kind argument in :meth:`phoebe.frontend.bundle.Bundle.add_component` :parameter **kw...
[ "def", "envelope", "(", "component", ",", "*", "*", "kwargs", ")", ":", "params", "=", "[", "]", "params", "+=", "[", "FloatParameter", "(", "qualifier", "=", "'abun'", ",", "value", "=", "kwargs", ".", "get", "(", "'abun'", ",", "0.", ")", ",", "d...
Create parameters for an envelope (usually will be attached to two stars solRad that they can share a common-envelope) Generally, this will be used as an input to the kind argument in :meth:`phoebe.frontend.bundle.Bundle.add_component` :parameter **kwargs: defaults for the values of any of the par...
[ "Create", "parameters", "for", "an", "envelope", "(", "usually", "will", "be", "attached", "to", "two", "stars", "solRad", "that", "they", "can", "share", "a", "common", "-", "envelope", ")" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/parameters/component.py#L136-L179
phoebe-project/phoebe2
phoebe/algorithms/interp_nDgrid.py
create_pixeltypegrid
def create_pixeltypegrid(grid_pars, grid_data): """ Creates pixelgrid and arrays of axis values. Starting from: - grid_pars: 2D numpy array, 1 column per parameter, unlimited number of cols - grid_data: 2D numpy array, 1 column per variable, data corresponding t...
python
def create_pixeltypegrid(grid_pars, grid_data): """ Creates pixelgrid and arrays of axis values. Starting from: - grid_pars: 2D numpy array, 1 column per parameter, unlimited number of cols - grid_data: 2D numpy array, 1 column per variable, data corresponding t...
[ "def", "create_pixeltypegrid", "(", "grid_pars", ",", "grid_data", ")", ":", "uniques", "=", "[", "np", ".", "unique", "(", "column", ",", "return_inverse", "=", "True", ")", "for", "column", "in", "grid_pars", "]", "#[0] are the unique values, [1] the indices for...
Creates pixelgrid and arrays of axis values. Starting from: - grid_pars: 2D numpy array, 1 column per parameter, unlimited number of cols - grid_data: 2D numpy array, 1 column per variable, data corresponding to the rows in grid_pars The grid should be rec...
[ "Creates", "pixelgrid", "and", "arrays", "of", "axis", "values", ".", "Starting", "from", ":", "-", "grid_pars", ":", "2D", "numpy", "array", "1", "column", "per", "parameter", "unlimited", "number", "of", "cols", "-", "grid_data", ":", "2D", "numpy", "arr...
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/algorithms/interp_nDgrid.py#L21-L73
phoebe-project/phoebe2
phoebe/algorithms/interp_nDgrid.py
interpolate
def interpolate(p, axis_values, pixelgrid, order=1, mode='constant', cval=0.0): """ Interpolates in a grid prepared by create_pixeltypegrid(). p is an array of parameter arrays @param p: Npar x Ninterpolate array @type p: array @return: Ndata x Ninterpolate array @rtype: array ...
python
def interpolate(p, axis_values, pixelgrid, order=1, mode='constant', cval=0.0): """ Interpolates in a grid prepared by create_pixeltypegrid(). p is an array of parameter arrays @param p: Npar x Ninterpolate array @type p: array @return: Ndata x Ninterpolate array @rtype: array ...
[ "def", "interpolate", "(", "p", ",", "axis_values", ",", "pixelgrid", ",", "order", "=", "1", ",", "mode", "=", "'constant'", ",", "cval", "=", "0.0", ")", ":", "# convert requested parameter combination into a coordinate", "p_", "=", "np", ".", "array", "(", ...
Interpolates in a grid prepared by create_pixeltypegrid(). p is an array of parameter arrays @param p: Npar x Ninterpolate array @type p: array @return: Ndata x Ninterpolate array @rtype: array
[ "Interpolates", "in", "a", "grid", "prepared", "by", "create_pixeltypegrid", "()", ".", "p", "is", "an", "array", "of", "parameter", "arrays" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/algorithms/interp_nDgrid.py#L76-L101
phoebe-project/phoebe2
phoebe/algorithms/interp_nDgrid.py
cinterpolate
def cinterpolate(p, axis_values, pixelgrid): """ Interpolates in a grid prepared by create_pixeltypegrid(). Does a similar thing as :py:func:`interpolate`, but does everything in C. p is an array of parameter arrays. Careful, the shape of input :envvar:`p` and output is the transpose ...
python
def cinterpolate(p, axis_values, pixelgrid): """ Interpolates in a grid prepared by create_pixeltypegrid(). Does a similar thing as :py:func:`interpolate`, but does everything in C. p is an array of parameter arrays. Careful, the shape of input :envvar:`p` and output is the transpose ...
[ "def", "cinterpolate", "(", "p", ",", "axis_values", ",", "pixelgrid", ")", ":", "res", "=", "libphoebe", ".", "interp", "(", "p", ",", "axis_values", ",", "pixelgrid", ")", "return", "res" ]
Interpolates in a grid prepared by create_pixeltypegrid(). Does a similar thing as :py:func:`interpolate`, but does everything in C. p is an array of parameter arrays. Careful, the shape of input :envvar:`p` and output is the transpose of :py:func:`interpolate`. @param p: Ninterp...
[ "Interpolates", "in", "a", "grid", "prepared", "by", "create_pixeltypegrid", "()", ".", "Does", "a", "similar", "thing", "as", ":", "py", ":", "func", ":", "interpolate", "but", "does", "everything", "in", "C", ".", "p", "is", "an", "array", "of", "param...
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/algorithms/interp_nDgrid.py#L104-L121
phoebe-project/phoebe2
phoebe/__init__.py
logger
def logger(*args, **kwargs): """ shortcut to :func:`utils.get_basic_logger` """ if mpi.within_mpirun and mpi.myrank == 0: # tell the workers to invoke the same logger mpi.comm.bcast({'worker_command': 'logger', 'args': args, 'kwargs': kwargs}, root=0) return _utils.get_basic_logger(...
python
def logger(*args, **kwargs): """ shortcut to :func:`utils.get_basic_logger` """ if mpi.within_mpirun and mpi.myrank == 0: # tell the workers to invoke the same logger mpi.comm.bcast({'worker_command': 'logger', 'args': args, 'kwargs': kwargs}, root=0) return _utils.get_basic_logger(...
[ "def", "logger", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "mpi", ".", "within_mpirun", "and", "mpi", ".", "myrank", "==", "0", ":", "# tell the workers to invoke the same logger", "mpi", ".", "comm", ".", "bcast", "(", "{", "'worker_comma...
shortcut to :func:`utils.get_basic_logger`
[ "shortcut", "to", ":", "func", ":", "utils", ".", "get_basic_logger" ]
train
https://github.com/phoebe-project/phoebe2/blob/e64b8be683977064e2d55dd1b3ac400f64c3e379/phoebe/__init__.py#L292-L300