Skip to content
Snippets Groups Projects
Commit a6ab8b1a authored by Jan Caron's avatar Jan Caron
Browse files

New TODOs and small changes to environment.yml.

parent f32e01b0
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,7 @@ dependencies:
# IPython and notebooks:
- ipython=5.3
- jupyter=1.0
- nb_conda=2.2
# TODO: Add back GUI dependencies!
# TODO: Get Jutil from gitlab (currently doesn't work, git and cygwin don't play nice,...
# TODO: ...because one is Unix, ond is Windows).
......
......@@ -492,7 +492,7 @@ class LCurve(object):
self.chisq_m = []
if save_dir is not None:
assert os.path.isdir(save_dir), 'save_dir has to be None or a valid directory!'
self.save_dir = save_dir
self.save_dir = save_dir # TODO: Use save_dir!!!
self._log.debug('Created ' + str(self))
def calculate(self, lam):
......
......@@ -794,6 +794,9 @@ class VectorData(FieldData):
from .file_io.io_vectordata import save_vectordata
save_vectordata(self, filename, **kwargs)
# TODO: we have 2D and 3D plots, what about 1D line of vector arrows? Would be nice!
# TODO: Make all a bit more flexible with squeeze (so dimensions are not as strict).
def plot_quiver(self, ar_dens=1, log=False, scaled=True, scale=1., b_0=None, qkey_unit='T',
coloring='angle', cmap=None, # Used here and plot_streamlines!
proj_axis='z', ax_slice=None, show_mask=True, bgcolor=None, axis=None,
......
......@@ -375,6 +375,7 @@ class DistributedForwardModel(ForwardModel):
self.proc_hook_points = [0]
self.pipes = []
self.processes = []
print('NPROCS:', self.nprocs) # TODO: Logging instead of printing!
for proc_id in range(self.nprocs):
# Create SubDataSets:
sub_data = DataSet(self.data_set.a, self.data_set.dim, self.data_set.b_0,
......@@ -510,6 +511,7 @@ class DistributedForwardModel(ForwardModel):
def _worker(fwd_model, pipe):
# Has to be directly accessible in the module as a function, NOT a method of a class instance!
# TODO: Logging instead of printing!
print('... {} starting!'.format(mp.current_process().name))
sys.stdout.flush()
for method, arguments in iter(pipe.recv, 'STOP'):
......
......@@ -31,6 +31,8 @@ from . import plottools
__all__ = ['PhaseMap']
# TODO: check out pint for units and stuff!
class PhaseMap(object):
"""Class for storing phase map data.
......
......@@ -18,7 +18,7 @@ __all__ = ['NoneRegularisator', 'ZeroOrderRegularisator', 'FirstOrderRegularisat
'ComboRegularisator']
class Regularisator(object, metaclass=abc.ABCMeta):
class Regularisator(object, metaclass=abc.ABCMeta): # TODO: Does this have to be abstract??
"""Class for providing a regularisation term which implements additional constraints.
Represents a certain constraint for the 3D magnetization distribution whose cost is to minimize
......
......@@ -45,7 +45,7 @@ def reconstruction_2d_from_phasemap(phasemap, b_0=1, lam=1E-3, max_iter=100, ram
If True, the results are plotted after reconstruction.
ar_dens: int, optional
Number defining the arrow density which is plotted. A higher ar_dens number skips more
arrows (a number of 2 plots every second arrow). Default is 1.
arrows (a number of 2 plots every second arrow). Will be estimated if not provided.
verbose: bool, optional
If set to True, information like a progressbar is displayed during reconstruction.
The default is False.
......
......@@ -10,6 +10,8 @@ import numpy as np
import multiprocessing as mp
from jutil.taketime import TakeTime
from .. import reconstruction
from ..dataset import DataSet
from ..projector import XTiltProjector, YTiltProjector
......
# -*- coding: utf-8 -*-
""""This file is generated automatically by the Pyramid `setup.py`"""
version = "0.1.0-dev"
version = "0.1.0.dev0"
hg_revision = "???"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment