summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@debian.org>2022-03-28 15:10:24 +0200
committerPicca Frédéric-Emmanuel <picca@debian.org>2022-03-28 15:10:24 +0200
commitf3ce77bbc7f5184cb237822183e271eabf04c403 (patch)
treeafd1661b58cbe1a245b7d615749894e1b720d4ae
parentae2172785aebeb73775efd35318835e1351a9bca (diff)
parentcf81fe9a4dd29fcd25c962056b0ac3e5ac29fbb2 (diff)
Update upstream source from tag 'upstream/0.0.11'
Update to upstream version '0.0.11' with Debian dir d87aa35592df6407b463ca4678bbe7b055ea3c4c
-rw-r--r--README.md5
-rwxr-xr-xbinoculars/space.py2
-rw-r--r--scripts/D2Dview.py1
-rwxr-xr-xscripts/binoculars2
-rwxr-xr-xscripts/binoculars-fitaid2
-rwxr-xr-xscripts/binoculars-gui14
-rwxr-xr-xscripts/binoculars-processgui2
-rwxr-xr-xscripts/binoculars-server2
-rw-r--r--scripts/binoviewer.py3
-rw-r--r--scripts/grafit2.py1
-rw-r--r--scripts/nxsViewer.py2
11 files changed, 22 insertions, 14 deletions
diff --git a/README.md b/README.md
index e4b986a..ed8288d 100644
--- a/README.md
+++ b/README.md
@@ -14,10 +14,13 @@ Grab the [latest sourcecode as zip](https://github.com/id03/binoculars/archive/m
The [BINoculars wiki](https://github.com/id03/binoculars/wiki) contains a detailed tutorial to get started.
+## Local usage from sources folder
+
+`PYTHONPATH=<absolute path to binoculars sources directory> <absolute path to the scripts folder>/<script_name>`
## Scripting
-If you want more complex operations than offered by the command line or GUI tools, you can manipulate BINoculars data directly from Python. Some examples with detailed comments can be found in the [repository](https://github.com/id03/binoculars/tree/master/examples/scripts). The API documentation on the `binoculars` and `binoculars.space` modules can be accessed via pydoc, e.g. run `pydoc -w binoculars binoculars.space` to generate HTML files.
+If you want more complex operations than offered by the command line or GUI tools, you can manipulate BINoculars data directly from Python. Some examples with detailed comments can be found in the [repository](https://github.com/id03/binoculars/tree/master/examples/scripts). The API documentation on the `binoculars` and `binoculars.space` modules can be accessed via pydoc, e.g. run `pydoc -w binoculars binoculars.space` to generate HTML files.
## Extending BINoculars
diff --git a/binoculars/space.py b/binoculars/space.py
index 3a60d1f..84d28b8 100755
--- a/binoculars/space.py
+++ b/binoculars/space.py
@@ -124,7 +124,7 @@ class Axis(object):
if value.stop is None:
stop = None
else:
- stop = self._get_index_float(value.stop)
+ stop = self._get_index_float(value.stop) + 1
if start is not None and stop is not None and start > stop:
start, stop = stop, start
return slice(start, stop)
diff --git a/scripts/D2Dview.py b/scripts/D2Dview.py
index a776968..a0d6cec 100644
--- a/scripts/D2Dview.py
+++ b/scripts/D2Dview.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+#!/usr/bin/env python3
"""
Created on Fri Dec 12 13:42:19 2014
diff --git a/scripts/binoculars b/scripts/binoculars
index 067229b..ddb6fdf 100755
--- a/scripts/binoculars
+++ b/scripts/binoculars
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import sys
import os
diff --git a/scripts/binoculars-fitaid b/scripts/binoculars-fitaid
index 968d924..4032d0c 100755
--- a/scripts/binoculars-fitaid
+++ b/scripts/binoculars-fitaid
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
# TODO: export des fit en ascii should be versionned.
diff --git a/scripts/binoculars-gui b/scripts/binoculars-gui
index a0f69bd..770fb03 100755
--- a/scripts/binoculars-gui
+++ b/scripts/binoculars-gui
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
from __future__ import unicode_literals
import sys
@@ -1035,7 +1035,7 @@ class TableWidget(QWidget):
self.table = QTableWidget(0, 4)
self.table.setHorizontalHeaderLabels(['', 'filename','labels', 'remove'])
-
+
for index, width in enumerate([25,150,50,70]):
self.table.setColumnWidth(index, width)
@@ -1145,7 +1145,7 @@ class LimitWidget(QWidget):
self.refreshbutton.clicked.connect(self.refresh)
vbox.addWidget(self.projectionlabel)
-
+
self.checkbox = list()
self.state = list()
@@ -1155,16 +1155,16 @@ class LimitWidget(QWidget):
self.state.append(box.checkState())
hbox.addWidget(box)
box.stateChanged.connect(self.update_checkbox)
-
+
self.state = numpy.array(self.state, dtype = numpy.bool)
self.init_checkbox()
vbox.addLayout(hbox)
-
+
for label in labels:
self.qlabels.append(QLabel(self))
self.leftindicator.append(QLineEdit(self))
- self.rightindicator.append(QLineEdit(self))
+ self.rightindicator.append(QLineEdit(self))
self.sliders.append(RangeSlider(Qt.Horizontal))
for index, label in enumerate(labels):
@@ -1235,7 +1235,7 @@ class LimitWidget(QWidget):
signal['project'] = project
signal['key'] = key
self.keydict.emit(signal)
-
+
def update_sliders_left(self):
for ax, left, right , slider in zip(self.axes, self.leftindicator, self.rightindicator, self.sliders):
try:
diff --git a/scripts/binoculars-processgui b/scripts/binoculars-processgui
index 72b9357..b55ba1f 100755
--- a/scripts/binoculars-processgui
+++ b/scripts/binoculars-processgui
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
binoculars gui for data processing
Created on 2015-06-04
diff --git a/scripts/binoculars-server b/scripts/binoculars-server
index 354a899..c3b82cf 100755
--- a/scripts/binoculars-server
+++ b/scripts/binoculars-server
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
'''Serverqueue where jobs can be submitted. Jobs will be calculated on
the spot or passed on to the OAR cluster if so specified in the
configfile. Jobs can be submitted in a json dictionary. The keyword
diff --git a/scripts/binoviewer.py b/scripts/binoviewer.py
index 5d8225b..b465dab 100644
--- a/scripts/binoviewer.py
+++ b/scripts/binoviewer.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Created on Wed Dec 07 11:10:28 2016
@@ -10,7 +11,7 @@ Created on Wed Dec 07 11:10:28 2016
# -*- coding: utf-8 -*-
#
-# Copyright © 2009-2011, 2020 CEA
+# Copyright © 2009-2011, 2020, 2021 CEA
# Pierre Raybaut
# Licensed under the terms of the CECILL License
# (see guiqwt/__init__.py for details)
diff --git a/scripts/grafit2.py b/scripts/grafit2.py
index 0a3d984..4b4e382 100644
--- a/scripts/grafit2.py
+++ b/scripts/grafit2.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+#!/usr/bin/env python3
"""
Created on Fri Dec 06 12:15:46 2013
diff --git a/scripts/nxsViewer.py b/scripts/nxsViewer.py
index 2029965..1eb056d 100644
--- a/scripts/nxsViewer.py
+++ b/scripts/nxsViewer.py
@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
+#!/usr/bin/env python3
+
"""
Created on Tue Oct 08 10:39:12 2013