text stringlengths 81 112k |
|---|
Load the distant Zotero data.
def load_distant(self):
"""Load the distant Zotero data."""
print("Loading distant Zotero data...")
self._references = self.get_references()
self.reference_types = self.get_reference_types()
self.reference_templates = self.get_reference_templates(se... |
Cache the Zotero data.
def cache(self):
"""Cache the Zotero data."""
with open(self.cache_path, "wb") as f:
cache = {self.CACHE_REFERENCE_LIST: self._references,
self.CACHE_REFERENCE_TYPES: self.reference_types,
self.CACHE_REFERENCE_TEMPLATES: self.... |
Validate and create the reference in Zotero and return the created item.
def create_distant_reference(self, ref_data):
"""Validate and create the reference in Zotero and return the created item."""
self.validate_reference_data(ref_data)
creation_status = self._zotero_lib.create_items([ref_data]... |
Replace the reference in the reference list and cache it.
def update_local_reference(self, index, ref):
"""Replace the reference in the reference list and cache it."""
self._references[index] = ref
self.cache() |
Validate and update the reference in Zotero.
Existing fields not present will be left unmodified.
def update_distant_reference(self, ref):
"""Validate and update the reference in Zotero.
Existing fields not present will be left unmodified.
"""
self.validate_reference_data(ref[... |
Validate the reference data.
Zotero.check_items() caches data after the first API call.
def validate_reference_data(self, ref_data):
"""Validate the reference data.
Zotero.check_items() caches data after the first API call.
"""
try:
self._zotero_lib.check_items([re... |
Return the reference types.
Zotero.item_types() caches data after the first API call.
def get_reference_types(self):
"""Return the reference types.
Zotero.item_types() caches data after the first API call.
"""
item_types = self._zotero_lib.item_types()
return sorted([x... |
Return the reference templates for the types as an ordered dictionary.
def get_reference_templates(self, ref_types):
"""Return the reference templates for the types as an ordered dictionary."""
return OrderedDict([(x, self.get_reference_template(x)) for x in ref_types]) |
Return the reference template for the type as an ordered dictionary.
Zotero.item_template() caches data after the first API call.
def get_reference_template(self, ref_type):
"""Return the reference template for the type as an ordered dictionary.
Zotero.item_template() caches data after the fi... |
Return the value of the field in 'extra', otherwise ''.
def reference_extra_field(self, field, index):
"""Return the value of the field in 'extra', otherwise ''."""
ref_data = self.reference_data(index)
extra_fields = ref_data["extra"].split("\n")
field_id = field + ":"
matched ... |
Return the reference ID (locally defined).
def reference_id(self, index):
"""Return the reference ID (locally defined)."""
# TODO Include ISBN and ISSN?
doi = self.reference_doi(index)
if doi:
return doi
else:
pmid = self.reference_pmid(index)
... |
Return the reference DOI.
def reference_doi(self, index):
"""Return the reference DOI."""
return self.reference_data(index).get("DOI", self.reference_extra_field("DOI", index)) |
Return as a list the surnames of the reference creators (locally defined).
def reference_creator_surnames(self, index):
"""Return as a list the surnames of the reference creators (locally defined)."""
# TODO Not true, ex: ISBN 978-1-4398-3778-8. Return all creator types?
# Academic books publis... |
Return the reference publication year.
def reference_year(self, index):
"""Return the reference publication year."""
# TODO Use meta:parsedDate field instead?
ref_date = self.reference_date(index)
try:
# NB: datetime.year returns an int.
return parse(ref_date).ye... |
Return the reference journal name.
def reference_journal(self, index):
"""Return the reference journal name."""
# TODO Change the column name 'Journal' to an other?
ref_type = self.reference_type(index)
if ref_type == "journalArticle":
return self.reference_data(index)["publ... |
Return the first reference with this ID.
def reference_index(self, ref_id):
"""Return the first reference with this ID."""
try:
indexes = range(self.reference_count())
return next(i for i in indexes if self.reference_id(i) == ref_id)
except StopIteration as e:
... |
Return for citation the creator surnames (locally defined) and the publication year.
def reference_creators_citation(self, ref_id):
"""Return for citation the creator surnames (locally defined) and the publication year."""
# FIXME Delayed refactoring. Use an index instead of an ID.
index = self... |
remove punctuation, lowercase, stem
def computePDFSimilarity(paperId, userPDF):
if not isPDFInDb(paperId):
return None
userPDF.save("temp.pdf")
# check_call is blocking
check_call(['pdftotext', '-enc', 'UTF-8', "temp.pdf", "temp.txt"])
os.remove("temp.pdf")
a = open("temp.txt", '... |
Accessing web-based ontology service is too long, so we cache the
information in a pickle file and query the services only if the info
has not already been cached.
def getChildren(root_id, maxDepth=100, relationshipType="subClassOf",
alwaysFetch=False):
"""
Accessing web-based ont... |
Automatically install plugins to the app.
:param plugins: List of plugin names to discover and install plugins
:param app: Any type of app to install plugins
:param install_type: The way to install plugins to app
:param config: Config object to initialize plugins
:return:
You should note that ... |
corners - list of nodal coordinates properly ordered for element type (counter clockwise)
def addElement(self,etype='hex8',corners=[-1.0,-1.0,-1.0,1.,-1.0,-1.0,1.0,1.0,-1.0,-1.0,1.0,-1.0,-1.0,-1.0,1.0,1.0,-1.0,1.0,1.0,1.0,1.0,-1.0,1.0,1.0],name='new_elem'):
'''
corners - list of nodal coordinates prope... |
Get nodes connected by an edge type from: /graph/edges/{type}
Arguments:
type: The type of the edge
entail: Should subproperties and equivalent properties be included
limit: The number of edges to be returned
skip: The number of edges to skip
callb... |
Get neighbors from: /graph/neighbors/{id}
Arguments:
id: This ID should be either a CURIE or an IRI
depth: How far to traverse neighbors
blankNodes: Traverse blank nodes
relationshipType: Which relationship to traverse
direction: Which direction to... |
Class Enrichment Service from: /analyzer/enrichment
Arguments:
sample: A list of CURIEs for nodes whose attributes are to be tested for enrichment. For example, a list of genes.
ontologyClass: CURIE for parent ontology class for the attribute to be tested. For example, GO biological ... |
Annotate text from: /annotations
Arguments:
content: The content to annotate
includeCat: A set of categories to include
excludeCat: A set of categories to exclude
minLength: The minimum number of characters in annotated entities
longestOnly: Should... |
Tag parts of speech. from: /lexical/pos
Arguments:
text: The text to tag
def getPos(self, text):
""" Tag parts of speech. from: /lexical/pos
Arguments:
text: The text to tag
"""
kwargs = {'text':text}
kwargs = {k:dumps(v) if type(v) is di... |
Find a concept by its prefix from: /vocabulary/autocomplete/{term}
Arguments:
term: Term prefix to find
limit: Maximum result count
searchSynonyms: Should synonyms be matched
searchAbbreviations: Should abbreviations be matched
searchAcronyms: Shou... |
Load zip file and return complex field
def load_cell(fname="HL60_field.zip"):
"Load zip file and return complex field"
here = op.dirname(op.abspath(__file__))
data = op.join(here, "data")
arc = zipfile.ZipFile(op.join(data, fname))
for f in arc.filelist:
with arc.open(f) as fd:
... |
This function will bootstrap data based on the sky coverage of rand.
It is different from bootstrap in the traditional sense, but for correlation
functions it gives the correct answer with less computation.
nbar : number density of rand, used to estimate the effective area of a pixel
n... |
r"""Convert angle :math:`\theta` :math:`\phi` to pixel.
This is translated from chealpix.c; but refer to Section 4.1 of
http://adsabs.harvard.edu/abs/2005ApJ...622..759G
def ang2pix(nside, theta, phi):
r"""Convert angle :math:`\theta` :math:`\phi` to pixel.
This is translated from chealpi... |
r"""Convert pixel to angle :math:`\theta` :math:`\phi`.
nside and pix are broadcast with numpy rules.
Returns: theta, phi
This is translated from chealpix.c; but refer to Section 4.1 of
http://adsabs.harvard.edu/abs/2005ApJ...622..759G
def pix2ang(nside, pix):
r"""Convert pixel t... |
Loads project specific lists
def load_project_flag_list_file(self, project_exceptions, project):
""" Loads project specific lists """
if self.loaded:
return
exception_file = None
for item in project_exceptions:
if project in item:
exception_file =... |
Gathers sha256 hashes from binary lists
def binary_hash(self, project, patch_file):
""" Gathers sha256 hashes from binary lists """
global il
exception_file = None
try:
project_exceptions = il.get('project_exceptions')
except KeyError:
logger.info('projec... |
Gathers file name lists
def file_audit_list(self, project):
""" Gathers file name lists """
project_list = False
self.load_project_flag_list_file(il.get('project_exceptions'), project)
try:
default_list = set((fl['file_audits']['file_names']))
except KeyError:
... |
gathers content strings
def file_content_list(self, project):
""" gathers content strings """
project_list = False
self.load_project_flag_list_file(il.get('project_exceptions'), project)
try:
flag_list = (fl['file_audits']['file_contents'])
except KeyError:
... |
Gathers a list of directories to ignore
def ignore_directories(self, project):
""" Gathers a list of directories to ignore """
project_list = False
try:
ignore_directories = il['ignore_directories']
except KeyError:
logger.error('Key Error processing ignore_direc... |
Gathers a list of URLs to ignore
def url_ignore(self, project):
""" Gathers a list of URLs to ignore """
project_list = False
try:
url_ignore = il['url_ignore']
except KeyError:
logger.error('Key Error processing url_ignore list values')
try:
... |
Gathers a list of URLs to ignore
def ip_ignore(self, project):
""" Gathers a list of URLs to ignore """
project_list = False
try:
ip_ignore = il['ip_ignore']
except KeyError:
logger.error('Key Error processing ip_ignore list values')
try:
pro... |
Download database from GitHub
:param fname: file name with extension ('.zip') of the target item
:type fname: str
:param path: path to save unzipped files
:type path: str
:return: database folder
:rtype: folder
def download_from_github(fname, path):
"""
Download database from GitHub
... |
return a string array of all the element from the database
Parameters:
==========
database: string. Name of database
Raises:
======
ValueError if database can not be found
def get_list_element_from_database(database='ENDF_VII'):
"""return a string array of all the element from the databas... |
will try to find the element in the folder (database) specified
Parameters:
==========
element: string. Name of the element. Not case sensitive
database: string (default is 'ENDF_VII'). Name of folder that has the list of elements
Returns:
=======
bool: True if element was found in the dat... |
This method makes sure that all the elements from the various stacks are
in the database and that the thickness has the correct format (float)
Parameters:
==========
stack: dictionary that defines the various stacks
database: string (default is 'ENDF_VII') name of database
Raises:
====... |
create dictionary based on formula given
Parameters:
===========
formula: string
ex: 'AgCo2'
ex: 'Ag'
thickness: float (in mm) default is np.NaN
density: float (in g/cm3) default is np.NaN
database: string (default is ENDV_VIII). Database where to look for elements
Ra... |
return a dictionary with list of isotopes found in database and name of database files
Parameters:
===========
element: string. Name of the element
ex: 'Ag'
database: string (default is ENDF_VII)
Returns:
========
dictionary with isotopes and files
ex: {'Ag': {'isotope... |
return the energy (eV) and Sigma (barn) from the file_name
Parameters:
===========
file_name: string ('' by default) name of csv file
Returns:
========
pandas dataframe
Raises:
=======
IOError if file does not exist
def get_database_data(file_name=''):
"""return t... |
return the interpolated x and y axis for the given x range [e_min, e_max] with step defined
:param df: input data frame
:type df: pandas.DataFrame
:param e_min: left energy range in eV of new interpolated data
:type e_min: float
:param e_max: right energy range in eV of new interpolated data
:t... |
retrieve the Energy and sigma axis for the given isotope
:param database_file_name: path/to/file with extension
:type database_file_name: string
:param e_min: left energy range in eV of new interpolated data
:type e_min: float
:param e_max: right energy range in eV of new interpolated data
:typ... |
calculate the atoms per cm3 of the given compound (layer)
:param compound_dict: compound infomation to pass
:type compound_dict: dict
:return: molar mass and atom density for layer
:rtype: float
def get_atoms_per_cm3_of_layer(compound_dict: dict):
"""
calculate the atoms per cm3 of the given co... |
calculate the transmission signal using the formula
transmission = exp( - thickness_cm * atoms_per_cm3 * 1e-24 * sigma_b)
Parameters:
===========
thickness: float (in cm)
atoms_per_cm3: float (number of atoms per cm3 of element/isotope)
sigma_b: np.array of sigma retrieved from database
R... |
calculate the transmission signal using the formula
transmission = exp( - thickness_cm * atoms_per_cm3 * 1e-24 * sigma_b)
Parameters:
===========
thickness: float (in cm)
atoms_per_cm3: float (number of atoms per cm3 of element/isotope)
sigma_b: np.array of sigma retrieved from database
R... |
calculate the transmission signal using the formula
transmission = exp( - thickness_cm * atoms_per_cm3 * 1e-24 * sigma_b)
Parameters:
===========
thickness: float (in cm)
atoms_per_cm3: float (number of atoms per cm3 of element/isotope)
sigma_b: np.array of sigma retrieved from databas... |
convert distance into new units
Parameters:
===========
value: float. value to convert
from_units: string. Must be 'mm', 'cm' or 'm'
to_units: string. must be 'mm','cm' or 'm'
Returns:
========
converted value
Raises:
=======
ValueError if from_units is not a v... |
convert energy (eV) to time (us)
Parameters:
===========
array: array (in eV)
offset_us: float. Delay of detector in us
source_to_detector_m: float. Distance source to detector in m
Returns:
========
time: array in s
def ev_to_s(offset_us, source_to_detector_m, array):
# delay val... |
convert time (s) to energy (eV)
Parameters:
===========
numpy array of time in s
offset_us: float. Delay of detector in us
source_to_detector_m: float. Distance source to detector in m
Returns:
========
numpy array of energy in eV
def s_to_ev(offset_us, source_to_detector_m, array):
... |
convert energy (eV) to image numbers (#)
Parameters:
===========
numpy array of energy in eV
offset_us: float. Delay of detector in us
source_to_detector_m: float. Distance source to detector in m
Returns:
========
image numbers: array of image number
def ev_to_image_number(offset_us,... |
Clone a git repository inside a temporary folder, yield the folder then delete the folder.
:param string url: url of the repo to clone.
:param string branch: name of the branch to checkout to.
:param string commit: Optional commit rev to checkout to. If mentioned, that take over the branch
:return: yie... |
Force the move of the source inside the destination even if the destination has already a folder with the
name inside. In the case, the folder will be replaced.
:param string source: path of the source to move.
:param string destination: path of the folder to move the source to.
def force_move(source, des... |
Run a command inside the given folder.
:param string command: the command to execute.
:param string folder: the folder where to execute the command.
:return: the return code of the process.
:rtype: Tuple[int, str]
def _run_command_inside_folder(command, folder):
"""Run a command inside the given f... |
Parse the given url and update it with environment value if required.
:param basestring url:
:rtype: basestring
:raise: KeyError if environment variable is needed but not found.
def parse_url(url):
""" Parse the given url and update it with environment value if required.
:param basestring url:
... |
Install a third party odoo add-on
:param string destination: the folder where the add-on should end up at.
def install(self, destination):
""" Install a third party odoo add-on
:param string destination: the folder where the add-on should end up at.
"""
logger.info(
... |
Move modules froom the temp directory to the destination.
:param string temp_repo: the folder containing the code.
:param string destination: the folder where the add-on should end up at.
def _move_modules(self, temp_repo, destination):
"""Move modules froom the temp directory to the destinati... |
Get a list of module paths contained in a temp directory.
:param string temp_repo: the folder containing the modules.
def _get_module_folders(self, temp_repo):
"""Get a list of module paths contained in a temp directory.
:param string temp_repo: the folder containing the modules.
"""
... |
Evaluate if the module must be included in the Odoo addons.
:param string module: the name of the module
:rtype: bool
def _is_module_included(self, module):
"""Evaluate if the module must be included in the Odoo addons.
:param string module: the name of the module
:rtype: bool... |
Move odoo modules from the temp directory to the destination.
This step is different from a standard repository. In the base code
of Odoo, the modules are contained in a addons folder at the root
of the git repository. However, when deploying the application,
those modules are placed in... |
Merge code from the given repo url to the git repo contained in the given folder.
:param string folder: path of the folder where is the git repo cloned at.
:raise: RuntimeError if the patch could not be applied.
def apply(self, folder):
""" Merge code from the given repo url to the git repo co... |
Apply a patch from a git patch file.
:param string folder: path of the folder where is the git repo cloned at.
:raise: RuntimeError if the patch could not be applied.
def apply(self, folder):
"""Apply a patch from a git patch file.
:param string folder: path of the folder where is the... |
Create context to keep all needed variables in.
def _set_up_context(cls):
"""Create context to keep all needed variables in."""
cls.context = AttributeDict()
cls.context.new_meta = {}
cls.context.new_transitions = {}
cls.context.new_methods = {} |
Check if states enum exists and is proper one.
def _check_states_enum(cls):
"""Check if states enum exists and is proper one."""
states_enum_name = cls.context.get_config('states_enum_name')
try:
cls.context['states_enum'] = getattr(
cls.context.new_class, states_enu... |
Check if all states are strings.
def _check_if_states_are_strings(cls):
"""Check if all states are strings."""
for item in list(cls.context.states_enum):
if not isinstance(item.value, six.string_types):
raise ValueError(
'Item {name} is not string. Only s... |
Check initial state value - if is proper and translate it.
Initial state is required.
def _check_state_value(cls):
"""Check initial state value - if is proper and translate it.
Initial state is required.
"""
state_value = cls.context.get_config('initial_state', None)
s... |
Add attributes common to all state machines.
These are methods for setting and checking state etc.
def _add_standard_attributes(cls):
"""Add attributes common to all state machines.
These are methods for setting and checking state etc.
"""
setattr(
cls.context.new... |
Generate methods used for transitions.
def _generate_standard_transitions(cls):
"""Generate methods used for transitions."""
allowed_transitions = cls.context.get_config('transitions', {})
for key, transitions in allowed_transitions.items():
key = cls.context.new_meta['translator'].... |
Generate standard setters, getters and checkers.
def _generate_standard_methods(cls):
"""Generate standard setters, getters and checkers."""
for state in cls.context.states_enum:
getter_name = 'is_{name}'.format(name=state.value)
cls.context.new_methods[getter_name] = utils.gene... |
Add all generated methods to result class.
def _add_new_methods(cls):
"""Add all generated methods to result class."""
for name, method in cls.context.new_methods.items():
if hasattr(cls.context.new_class, name):
raise ValueError(
"Name collision in state... |
Check and set complete option.
def _set_complete_option(cls):
"""Check and set complete option."""
get_config = cls.context.get_config
complete = get_config('complete', None)
if complete is None:
conditions = [
get_config('transitions', False),
... |
Return the absolute path to the directory containing the package data.
def data_directory():
"""Return the absolute path to the directory containing the package data."""
package_directory = os.path.abspath(os.path.dirname(__file__))
return os.path.join(package_directory, "data") |
select a map by name and/or critiera
def selectMap(name=None, excludeName=False, closestMatch=True, **tags):
"""select a map by name and/or critiera"""
matches = filterMapAttrs(**tags)
if not matches: raise c.InvalidMapSelection("could not find any matching maps given criteria: %s"%tags)
if name: # if ... |
matches available maps if their attributes match as specified
def filterMapAttrs(records=getIndex(), **tags):
"""matches available maps if their attributes match as specified"""
if len(tags) == 0: return records # otherwise if unspecified, all given records match
ret = []
for record in records: # attem... |
attempt to match given attributes against a single map object's attributes
def matchRecordAttrs(mapobj, attrs):
"""attempt to match given attributes against a single map object's attributes"""
for k,v in iteritems(attrs):
try: val = getattr(mapobj, k)
except AttributeError: # k isn't a... |
matches each record against regexText according to parameters
NOTE: the code could be written more simply, but this is loop-optimized to
scale better with a large number of map records
def filterMapNames(regexText, records=getIndex(), excludeRegex=False, closestMatch=True):
"""matches each record ag... |
Tries conversion of any value to a boolean
def to_boolean(value, ctx):
"""
Tries conversion of any value to a boolean
"""
if isinstance(value, bool):
return value
elif isinstance(value, int):
return value != 0
elif isinstance(value, Decimal):
return value != Decimal(0)
... |
Tries conversion of any value to an integer
def to_integer(value, ctx):
"""
Tries conversion of any value to an integer
"""
if isinstance(value, bool):
return 1 if value else 0
elif isinstance(value, int):
return value
elif isinstance(value, Decimal):
try:
va... |
Tries conversion of any value to a decimal
def to_decimal(value, ctx):
"""
Tries conversion of any value to a decimal
"""
if isinstance(value, bool):
return Decimal(1) if value else Decimal(0)
elif isinstance(value, int):
return Decimal(value)
elif isinstance(value, Decimal):
... |
Tries conversion of any value to a string
def to_string(value, ctx):
"""
Tries conversion of any value to a string
"""
if isinstance(value, bool):
return "TRUE" if value else "FALSE"
elif isinstance(value, int):
return str(value)
elif isinstance(value, Decimal):
return f... |
Tries conversion of any value to a date
def to_date(value, ctx):
"""
Tries conversion of any value to a date
"""
if isinstance(value, str):
temporal = ctx.get_date_parser().auto(value)
if temporal is not None:
return to_date(temporal, ctx)
elif type(value) == datetime.da... |
Tries conversion of any value to a datetime
def to_datetime(value, ctx):
"""
Tries conversion of any value to a datetime
"""
if isinstance(value, str):
temporal = ctx.get_date_parser().auto(value)
if temporal is not None:
return to_datetime(temporal, ctx)
elif type(value... |
Tries conversion of any value to a date or datetime
def to_date_or_datetime(value, ctx):
"""
Tries conversion of any value to a date or datetime
"""
if isinstance(value, str):
temporal = ctx.get_date_parser().auto(value)
if temporal is not None:
return temporal
elif type... |
Tries conversion of any value to a time
def to_time(value, ctx):
"""
Tries conversion of any value to a time
"""
if isinstance(value, str):
time = ctx.get_date_parser().time(value)
if time is not None:
return time
elif isinstance(value, datetime.time):
return val... |
Converts a pair of arguments to their most-likely types. This deviates from Excel which doesn't auto convert values
but is necessary for us to intuitively handle contact fields which don't use the correct value type
def to_same(value1, value2, ctx):
"""
Converts a pair of arguments to their most-likely typ... |
Converts a value back to its representation form, e.g. x -> "x"
def to_repr(value, ctx):
"""
Converts a value back to its representation form, e.g. x -> "x"
"""
as_string = to_string(value, ctx)
if isinstance(value, str) or isinstance(value, datetime.date) or isinstance(value, datetime.time):
... |
Formats a decimal number
:param decimal: the decimal value
:return: the formatted string value
def format_decimal(decimal):
"""
Formats a decimal number
:param decimal: the decimal value
:return: the formatted string value
"""
# strip trailing fractional zeros
normalized = decimal.n... |
Check if I am running inside a Linux container.
def is_containerized() -> bool:
'''
Check if I am running inside a Linux container.
'''
try:
cginfo = Path('/proc/self/cgroup').read_text()
if '/docker/' in cginfo or '/lxc/' in cginfo:
return True
except IOError:
r... |
Detect the cloud provider where I am running on.
def detect_cloud() -> str:
'''
Detect the cloud provider where I am running on.
'''
# NOTE: Contributions are welcome!
# Please add other cloud providers such as Rackspace, IBM BlueMix, etc.
if sys.platform.startswith('linux'):
# Google C... |
Add block definition to list of blocks in material
Order for list entry: branch level (0=root), block type (material,solid,fluid,etc.), matid (integer if root, False otherwise),
material name (string if root, False otherwise), material type, dictionary of attributes or False if none
def addBlock(se... |
Refocus a 1D or 2D field
Parameters
----------
field : 1d or 2d array
1D or 2D background corrected electric field (Ex/BEx)
d : float
Distance to be propagated in pixels (negative for backwards)
nm : float
Refractive index of medium
res : float
Wavelenth in pixe... |
Refocus a stack of 1D or 2D fields
Parameters
----------
fieldstack : 2d or 3d array
Stack of 1D or 2D background corrected electric fields (Ex/BEx).
The first axis iterates through the individual fields.
d : float
Distance to be propagated in pixels (negative for backwards)
... |
Propagates a 1D or 2D Fourier transformed field
Parameters
----------
fftfield : 1-dimensional or 2-dimensional ndarray
Fourier transform of 1D Electric field component
d : float
Distance to be propagated in pixels (negative for backwards)
nm : float
Refractive index of med... |
Propagate a 1D Fourier transformed field in 2D
Parameters
----------
fftfield : 1d array
Fourier transform of 1D Electric field component
d : float
Distance to be propagated in pixels (negative for backwards)
nm : float
Refractive index of medium
res : float
Wa... |
Propagate a 2D Fourier transformed field in 3D
Parameters
----------
fftfield : 2d array
Fourier transform of 2D Electric field component
d : float
Distance to be propagated in pixels (negative for backwards)
nm : float
Refractive index of medium
res : float
Wa... |
Adding the no_thin argument to the GIT push because we had some issues pushing previously.
According to http://stackoverflow.com/questions/16586642/git-unpack-error-on-push-to-gerrit#comment42953435_23610917,
"a new optimization which causes git to send as little data as possible over the network caus... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.