From 059690ae8cd1bb18b8a47f4055e672c5725b83c7 Mon Sep 17 00:00:00 2001 From: Cyril Danilevski <cyril.danilevski@xfel.eu> Date: Tue, 1 Sep 2020 15:21:26 +0200 Subject: [PATCH] Fix grammar spelling --- cal_tools/cal_tools/metrology.py | 8 ++++---- cal_tools/cal_tools/plotting.py | 2 +- cal_tools/cal_tools/tools.py | 2 +- .../LPD/LPD_FlatField_Radial_per_pixel_CI_NBC.ipynb | 2 +- notebooks/LPD/playground/LPD_FlatField_Radial.ipynb | 2 +- notebooks/LPD/playground/lpdExample.ipynb | 2 +- notebooks/LPD/playground/metroLib.py | 10 +++++----- reportservice/report_service.py | 2 +- tests/correction_base.py | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cal_tools/cal_tools/metrology.py b/cal_tools/cal_tools/metrology.py index b4dd08017..bbaededce 100644 --- a/cal_tools/cal_tools/metrology.py +++ b/cal_tools/cal_tools/metrology.py @@ -6,7 +6,7 @@ from matplotlib import pylab as plt def getModulePosition(metrologyFile, moduleId): """Position (in mm) of a module relative to the top left - corner of it's quadrant. In case of tile-level positions, + corner of its quadrant. In case of tile-level positions, the the position refers to the center of the top left pixel. @@ -22,7 +22,7 @@ def getModulePosition(metrologyFile, moduleId): ------- ndarray: - (x, y)-Position of the module in it's quadrant + (x, y)-Position of the module in its quadrant Raises ------ @@ -52,7 +52,7 @@ def getModulePosition(metrologyFile, moduleId): # ['Q1', 'Q1/M1', 'Q1/M1/T01'] h5Keys = ['/'.join(moduleList[:idx+1]) for idx in range(len(moduleList))] - # Every module of the detector gives it's position relative to + # Every module of the detector gives its position relative to # the top left corner of its parent structure. Every position # is stored in the positions array positions = [] @@ -150,7 +150,7 @@ def plotSupermoduleData(tileData, metrologyPositions, zoom=1., vmin=100., vmax=6 assert tileData.shape == (16, 32, 128) # Conversion coefficient, required since - # matplotlib does it's business in inches + # matplotlib does its business in inches mmToInch = 1./25.4 # inch/mm # Some constants diff --git a/cal_tools/cal_tools/plotting.py b/cal_tools/cal_tools/plotting.py index 5f37145f4..5bafa91c6 100644 --- a/cal_tools/cal_tools/plotting.py +++ b/cal_tools/cal_tools/plotting.py @@ -9,7 +9,7 @@ def show_overview(d, cell_to_preview, gain_to_preview, out_folder=None, infix=No """ Show an overview :param d: A dict with the number of modules and - a dict for the constant names and it's data. + a dict for the constant names and their data. :param cell_to_preview: Integer number of memory cells to preview. :param gain_to_preview: Integer number for the gain stages to preview. :param out_folder: Output folder for saving the plotted.png image. diff --git a/cal_tools/cal_tools/tools.py b/cal_tools/cal_tools/tools.py index 69bbdc183..c253a7d7c 100644 --- a/cal_tools/cal_tools/tools.py +++ b/cal_tools/cal_tools/tools.py @@ -266,7 +266,7 @@ def get_dir_creation_date(directory, run, tsdir=False, verbosity=0): def save_const_to_h5(metadata, out_folder): """ - Save constant in h5 file with it's metadata + Save constant in h5 file with its metadata (e.g. db_module, condition, creation_time) :param metadata: Metadata diff --git a/notebooks/LPD/LPD_FlatField_Radial_per_pixel_CI_NBC.ipynb b/notebooks/LPD/LPD_FlatField_Radial_per_pixel_CI_NBC.ipynb index 2c27eb1ec..bde2f8ce4 100644 --- a/notebooks/LPD/LPD_FlatField_Radial_per_pixel_CI_NBC.ipynb +++ b/notebooks/LPD/LPD_FlatField_Radial_per_pixel_CI_NBC.ipynb @@ -459,7 +459,7 @@ "def plotSupermoduleData(smData, smPositions, dquads, zoom=1., vmin=1., vmax=2**16*0.5, norm=\"power\", gamma=0.3):\n", " \n", " # Conversion coefficient, required since\n", - " # matplotlib does it's business in inches\n", + " # matplotlib does its business in inches\n", " mmToInch = 1./25.4 # inch/mm\n", " \n", " # Some constants\n", diff --git a/notebooks/LPD/playground/LPD_FlatField_Radial.ipynb b/notebooks/LPD/playground/LPD_FlatField_Radial.ipynb index 076414558..732ce8cd9 100644 --- a/notebooks/LPD/playground/LPD_FlatField_Radial.ipynb +++ b/notebooks/LPD/playground/LPD_FlatField_Radial.ipynb @@ -682,7 +682,7 @@ "def plotSupermoduleData(smData, smPositions, dquads, zoom=1., vmin=1., vmax=2**16*0.5, norm=\"power\", gamma=0.3):\n", " \n", " # Conversion coefficient, required since\n", - " # matplotlib does it's business in inches\n", + " # matplotlib does its business in inches\n", " mmToInch = 1./25.4 # inch/mm\n", " \n", " # Some constants\n", diff --git a/notebooks/LPD/playground/lpdExample.ipynb b/notebooks/LPD/playground/lpdExample.ipynb index 40243ec1f..7d3bad55a 100644 --- a/notebooks/LPD/playground/lpdExample.ipynb +++ b/notebooks/LPD/playground/lpdExample.ipynb @@ -82,7 +82,7 @@ "source": [ "# Load some examplary LaB6 data\n", "lab6 = np.load('averaged_00000.npy')\n", - "# Need to invert the axis here, since it's based on\n", + "# Need to invert the axis here, since its based on\n", "# uncalibrated raw data\n", "lab6 = lab6[:, ::-1, ::-1]" ] diff --git a/notebooks/LPD/playground/metroLib.py b/notebooks/LPD/playground/metroLib.py index 5e479a2e3..b3a4cd8b0 100644 --- a/notebooks/LPD/playground/metroLib.py +++ b/notebooks/LPD/playground/metroLib.py @@ -6,7 +6,7 @@ from matplotlib import pylab as plt def getModulePosition(metrologyFile, moduleId): """Position (in mm) of a module relative to the top left - corner of it's quadrant. In case of tile-level positions, + corner of its quadrant. In case of tile-level positions, the the position refers to the center of the top left pixel. @@ -22,7 +22,7 @@ def getModulePosition(metrologyFile, moduleId): ------- ndarray: - (x, y)-Position of the module in it's quadrant + (x, y)-Position of the module in its quadrant Raises ------ @@ -52,7 +52,7 @@ def getModulePosition(metrologyFile, moduleId): # ['Q1', 'Q1/M1', 'Q1/M1/T01'] h5Keys = ['/'.join(moduleList[:idx+1]) for idx in range(len(moduleList))] - # Every module of the detector gives it's position relative to + # Every module of the detector gives its position relative to # the top left corner of its parent structure. Every position # is stored in the positions array positions = [] @@ -150,7 +150,7 @@ def plotSupermoduleData(tileData, metrologyPositions, zoom=1., vmin=100., vmax=6 assert tileData.shape == (16, 32, 128) # Conversion coefficient, required since - # matplotlib does it's business in inches + # matplotlib does its business in inches mmToInch = 1./25.4 # inch/mm # Some constants @@ -373,4 +373,4 @@ def positionFileList(filelist, datapath, geometry_file, quad_pos, nImages='all') full_data.append((i, np.zeros_like(dummy))) #[print(f[1].shape, f[0]) for f in full_data] pos = returnPositioned2(geometry_file, full_data, quad_pos) - return np.moveaxis(pos, 2, 0) \ No newline at end of file + return np.moveaxis(pos, 2, 0) diff --git a/reportservice/report_service.py b/reportservice/report_service.py index e2441227d..c21babe2c 100644 --- a/reportservice/report_service.py +++ b/reportservice/report_service.py @@ -108,7 +108,7 @@ async def del_folder(fpath): async def copy_files(f, path, sem): """ Copying with concurrency limitation - :param f: the main file with it's current path. + :param f: the main file with its current path. :param path: the path, where f is copied to. :param sem: Semaphore is a variable that controls access to common resources. diff --git a/tests/correction_base.py b/tests/correction_base.py index 5b336c324..86d32b605 100644 --- a/tests/correction_base.py +++ b/tests/correction_base.py @@ -33,7 +33,7 @@ parser.add_argument('--generate-wo-execution', action="store_true", "artefacts from the test. These will be placed in " + "the artefact directory, under the latest commit " + "your git repository is on. This will not launch " + - "the notebook being tested, but assumes it's " + + "the notebook being tested, but assumes its " + "output is already present. Use e.g. to debug tests.") parser.add_argument('--test-wo-execution', action="store_true", default=False, help="Run tests, but do not execute the notebook being " + -- GitLab