Skip to content

Commit e12104d

Browse files
author
Sophie Reed
committed
Fix formatting issues
1 parent f2c66ae commit e12104d

File tree

9 files changed

+165
-150
lines changed

9 files changed

+165
-150
lines changed

doc/manifest.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ modules:
88
# Name of the static content directories (subdirectories of `_static`).
99
# Static content directories are usually named after the package.
1010
# Most packages do not need a static content directory (leave commented out).
11-
statics:
12-
- "_static/analysis_tools"
11+
statics:
12+
- "_static/analysis_tools"

python/lsst/analysis/tools/actions/plot/barPlots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class BarPanel(Config):
5454

5555

5656
class BarPlot(PlotAction):
57-
"""A plotting tool which can take multiple keyed data inputs
57+
"""A plotting tool which can take multiple keyed data inputs
5858
and can create one or more bar graphs.
5959
"""
6060

python/lsst/analysis/tools/actions/plot/colorColorFitPlot.py

Lines changed: 97 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040

4141

4242
class ColorColorFitPlot(PlotAction):
43-
"""Makes a color-color plot and overplots a
43+
"""Makes a color-color plot and overplots a
4444
prefited line to the specified area of the plot.
45-
This is mostly used for the stellar locus plots
46-
and also includes panels that illustrate the
45+
This is mostly used for the stellar locus plots
46+
and also includes panels that illustrate the
4747
goodness of the given fit.
4848
"""
4949

@@ -113,96 +113,100 @@ def makePlot(
113113
) -> Figure:
114114
"""Make stellar locus plots using pre fitted values.
115115
116-
Parameters
117-
----------
118-
data : `KeyedData`
119-
The data to plot the points from, for more information
120-
please see the notes section.
121-
plotInfo : `dict`
122-
A dictionary of information about the data being plotted with keys:
123-
124-
* ``"run"``
125-
The output run for the plots (`str`).
126-
* ``"skymap"``
127-
The type of skymap used for the data (`str`).
128-
* ``"filter"``
129-
The filter used for this data (`str`).
130-
* ``"tract"``
131-
The tract that the data comes from (`str`).
132-
133-
Returns
134-
-------
135-
fig : `matplotlib.figure.Figure`
136-
The resulting figure.
137-
138-
Notes
139-
-----
140-
The axis labels are given by `self.config.xLabel` and
141-
`self.config.yLabel`. The perpendicular distance of the points to
142-
the fit line is given in a histogram in the second panel.
143-
144-
For the code to work it expects various quantities to be
145-
present in the 'data' that it is given.
146-
147-
The quantities that are expected to be present are:
148-
149-
* Statistics that are shown on the plot or used by the plotting code:
150-
* ``approxMagDepth``
151-
The approximate magnitude corresponding to the SN cut used.
152-
* ``f"{self.plotName}_sigmaMAD"``
153-
The sigma mad of the distances to the line fit.
154-
* ``f"{self.identity or ''}_median"``
155-
The median of the distances to the line fit.
156-
* ``f"{self.identity or ''}_hardwired_sigmaMAD"``
157-
The sigma mad of the distances to the initial fit.
158-
* ``f"{self.identity or ''}_hardwired_median"``
159-
The median of the distances to the initial fit.
160-
161-
162-
* Parameters from the fitting code that are illustrated on the plot:
163-
* ``"bHW"``
164-
The hardwired intercept to fall back on.
165-
* ``"bODR"``
166-
The intercept calculated by the orthogonal distance
167-
regression fitting.
168-
* ``"bODR2"``
169-
The intercept calculated by the second iteration of
170-
orthogonal distance regression fitting.
171-
* ``"mHW"``
172-
The hardwired gradient to fall back on.
173-
* ``"mODR"``
174-
The gradient calculated by the orthogonal distance
175-
regression fitting.
176-
* ``"mODR2"``
177-
The gradient calculated by the second iteration of
178-
orthogonal distance regression fitting.
179-
* ``"xMin`"``
180-
The x minimum of the box used in the fit.
181-
* ``"xMax"``
182-
The x maximum of the box used in the fit.
183-
* ``"yMin"``
184-
The y minimum of the box used in the fit.
185-
* ``"yMax"``
186-
The y maximum of the box used in the fit.
187-
* ``"mPerp"``
188-
The gradient of the line perpendicular to the line from
189-
the second ODR fit.
190-
* ``"bPerpMin"``
191-
The intercept of the perpendicular line that goes through xMin.
192-
* ``"bPerpMax"``
193-
The intercept of the perpendicular line that goes through xMax.
194-
195-
* The main inputs to plot:
196-
x, y, mag
197-
198-
Examples
199-
--------
200-
An example of the plot produced from this code is here:
201-
202-
.. image:: /_static/analysis_tools/stellarLocusExample.png
203-
204-
For a detailed example of how to make a plot from the command line
205-
please see the :ref:`getting started guide<analysis-tools-getting-started>`.
116+
Parameters
117+
----------
118+
data : `KeyedData`
119+
The data to plot the points from, for more information
120+
please see the notes section.
121+
plotInfo : `dict`
122+
A dictionary of information about the data being plotted
123+
with keys:
124+
125+
* ``"run"``
126+
The output run for the plots (`str`).
127+
* ``"skymap"``
128+
The type of skymap used for the data (`str`).
129+
* ``"filter"``
130+
The filter used for this data (`str`).
131+
* ``"tract"``
132+
The tract that the data comes from (`str`).
133+
134+
Returns
135+
-------
136+
fig : `matplotlib.figure.Figure`
137+
The resulting figure.
138+
139+
Notes
140+
-----
141+
The axis labels are given by `self.config.xLabel` and
142+
`self.config.yLabel`. The perpendicular distance of the points to
143+
the fit line is given in a histogram in the second panel.
144+
145+
For the code to work it expects various quantities to be
146+
present in the 'data' that it is given.
147+
148+
The quantities that are expected to be present are:
149+
150+
* Statistics that are shown on the plot or used by the plotting code:
151+
* ``approxMagDepth``
152+
The approximate magnitude corresponding to the SN cut used.
153+
* ``f"{self.plotName}_sigmaMAD"``
154+
The sigma mad of the distances to the line fit.
155+
* ``f"{self.identity or ''}_median"``
156+
The median of the distances to the line fit.
157+
* ``f"{self.identity or ''}_hardwired_sigmaMAD"``
158+
The sigma mad of the distances to the initial fit.
159+
* ``f"{self.identity or ''}_hardwired_median"``
160+
The median of the distances to the initial fit.
161+
162+
163+
* Parameters from the fitting code that are illustrated on the plot:
164+
* ``"bHW"``
165+
The hardwired intercept to fall back on.
166+
* ``"bODR"``
167+
The intercept calculated by the orthogonal distance
168+
regression fitting.
169+
* ``"bODR2"``
170+
The intercept calculated by the second iteration of
171+
orthogonal distance regression fitting.
172+
* ``"mHW"``
173+
The hardwired gradient to fall back on.
174+
* ``"mODR"``
175+
The gradient calculated by the orthogonal distance
176+
regression fitting.
177+
* ``"mODR2"``
178+
The gradient calculated by the second iteration of
179+
orthogonal distance regression fitting.
180+
* ``"xMin`"``
181+
The x minimum of the box used in the fit.
182+
* ``"xMax"``
183+
The x maximum of the box used in the fit.
184+
* ``"yMin"``
185+
The y minimum of the box used in the fit.
186+
* ``"yMax"``
187+
The y maximum of the box used in the fit.
188+
* ``"mPerp"``
189+
The gradient of the line perpendicular to the line from
190+
the second ODR fit.
191+
* ``"bPerpMin"``
192+
The intercept of the perpendicular line that goes through
193+
xMin.
194+
* ``"bPerpMax"``
195+
The intercept of the perpendicular line that goes through
196+
xMax.
197+
198+
* The main inputs to plot:
199+
x, y, mag
200+
201+
Examples
202+
--------
203+
An example of the plot produced from this code is here:
204+
205+
.. image:: /_static/analysis_tools/stellarLocusExample.png
206+
207+
For a detailed example of how to make a plot from the command line
208+
please see the
209+
:ref:`getting started guide<analysis-tools-getting-started>`.
206210
"""
207211

208212
# Define a new colormap

python/lsst/analysis/tools/actions/plot/scatterplotWithTwoHists.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353

5454
class ScatterPlotStatsAction(KeyedDataAction):
55-
"""Calculates the statistics needed for the
55+
"""Calculates the statistics needed for the
5656
scatter plot with two hists.
5757
"""
5858

@@ -138,7 +138,7 @@ class _StatsContainer(NamedTuple):
138138

139139

140140
class ScatterPlotWithTwoHists(PlotAction):
141-
"""Makes a scatter plot of the data with a marginal
141+
"""Makes a scatter plot of the data with a marginal
142142
histogram for each axis.
143143
"""
144144

@@ -287,26 +287,26 @@ def makePlot(
287287
which points to plot and the statisticSelector actions to determine
288288
which points to use for the printed statistics.
289289
290-
If this function is being used within the pipetask framework
291-
that takes care of making sure that data has all the required
292-
elements but if you are runnign this as a standalone function
293-
then you will need to provide the following things in the
290+
If this function is being used within the pipetask framework
291+
that takes care of making sure that data has all the required
292+
elements but if you are runnign this as a standalone function
293+
then you will need to provide the following things in the
294294
input data.
295295
296296
* If stars is in self.plotTypes:
297-
xStars, yStars, starsHighSNMask, starsLowSNMask and
298-
{band}_highSNStars_{name}, {band}_lowSNStars_{name}
297+
xStars, yStars, starsHighSNMask, starsLowSNMask and
298+
{band}_highSNStars_{name}, {band}_lowSNStars_{name}
299299
where name is median, sigma_Mad, count and approxMag.
300300
301-
* If it is for galaxies/unknowns then replace stars in the above
301+
* If it is for galaxies/unknowns then replace stars in the above
302302
names with galaxies/unknowns.
303303
304-
* If it is for any (which covers all the points) then it
305-
becomes, x, y, and any instead of stars for the other
304+
* If it is for any (which covers all the points) then it
305+
becomes, x, y, and any instead of stars for the other
306306
parameters given above.
307307
308308
* In every case it is expected that data contains:
309-
lowSnThreshold, highSnThreshold and patch
309+
lowSnThreshold, highSnThreshold and patch
310310
(if the summary plot is being plotted).
311311
312312
Examples
@@ -316,7 +316,8 @@ def makePlot(
316316
.. image:: /_static/analysis_tools/scatterPlotExample.png
317317
318318
For a detailed example of how to make a plot from the command line
319-
please see the :ref:`getting started guide<analysis-tools-getting-started>`.
319+
please see the
320+
:ref:`getting started guide<analysis-tools-getting-started>`.
320321
"""
321322
if not self.plotTypes:
322323
noDataFig = Figure()

python/lsst/analysis/tools/actions/plot/skyPlot.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
class SkyPlot(PlotAction):
4343
"""Plots the on sky distribution of a parameter.
4444
45-
Plots the values of the parameter given for the z axis
46-
according to the positions given for x and y. Optimised
47-
for use with RA and Dec. Also calculates some basic
45+
Plots the values of the parameter given for the z axis
46+
according to the positions given for x and y. Optimised
47+
for use with RA and Dec. Also calculates some basic
4848
statistics and includes those on the plot.
4949
"""
5050

@@ -170,19 +170,19 @@ def makePlot(
170170
171171
Notes
172172
-----
173-
Expects the data to contain slightly different things
174-
depending on the types specified in plotTypes. This
175-
is handled automatically if you go through the pipetask
176-
framework but if you call this method separately then you
173+
Expects the data to contain slightly different things
174+
depending on the types specified in plotTypes. This
175+
is handled automatically if you go through the pipetask
176+
framework but if you call this method separately then you
177177
need to make sure that data contains what the code is expecting.
178178
179-
If stars is in the plot types given then it is expected that
179+
If stars is in the plot types given then it is expected that
180180
data contains: xStars, yStars, zStars and starStatMask.
181181
182-
If galaxies is present: xGalaxies, yGalaxies, zGalaxies and
182+
If galaxies is present: xGalaxies, yGalaxies, zGalaxies and
183183
galaxyStatsMask.
184184
185-
If unknown is present: xUnknowns, yUnknowns, zUnknowns and
185+
If unknown is present: xUnknowns, yUnknowns, zUnknowns and
186186
unknownStatMask.
187187
188188
If any is specified: x, y, z, statMask.

0 commit comments

Comments
 (0)