Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

## Getting Started

Currently, easydiffraction is in beta and has not been released on PyPI. Please use the alternative method given below to install easydiffraction from our GitHub repository.

### Install EasyDiffraction python library

* Create and go to, e.g., **easydiffraction** directory (*optional*)
Expand All @@ -31,7 +33,7 @@
```
* Install **easydiffraction**
```
pip install easydiffraction
pip install easydiffraction --extra-index-url https://easyscience.github.io/pypi
```

## Examples
Expand All @@ -42,7 +44,7 @@

* Install **easydiffraction**, including `charts` extras for visualization
```
pip install 'easydiffraction[charts]'
pip install 'easydiffraction[charts]' --extra-index-url https://easyscience.github.io/pypi
```
* Install Jupyter Notebook
```
Expand Down
18 changes: 6 additions & 12 deletions easydiffraction/Job.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ def show_analysis_chart(self):

y_calc = self.calculate_profile()

peak_idx, _ = find_peaks(y_calc) #, prominence=1)
peak_idx, _ = find_peaks(y_calc)
x_bragg = self.experiment.x.data[peak_idx]
y_bragg = np.zeros_like(x_bragg)

Expand All @@ -759,8 +759,8 @@ def show_analysis_chart(self):
)

trace_bragg = go.Scatter(
x=x_bragg, # np.random.uniform(low=self.experiment.x.data.min(), high=self.experiment.x.data.max(), size=(50,)),
y=y_bragg, #np.zeros(50),
x=x_bragg,
y=y_bragg,
xaxis='x2',
yaxis='y2',
line=dict(color='rgb(230, 171, 2)'), #color=px.colors.qualitative.Plotly[9]),
Expand All @@ -778,7 +778,7 @@ def show_analysis_chart(self):
y=self.background,
xaxis='x3',
yaxis='y3',
line=dict(color='gray'), # default: width=2?
line=dict(color='gray'),
mode='lines',
name='Background (Ibkg)'
)
Expand Down Expand Up @@ -841,27 +841,25 @@ def show_analysis_chart(self):
title_text=x_axis_title,
anchor='y',
range=[x_min, x_max],
# linecolor='blue',
showline=True, mirror=True, zeroline=False
),
xaxis2=dict(
matches='x',
anchor='y2',
range=[x_min, x_max],
# linecolor='green',
showline=True, mirror=True, zeroline=False, showticklabels=False
),
xaxis3=dict(
matches='x',
anchor='y3',
range=[x_min, x_max],
# linecolor='red',
showline=True, mirror=True, zeroline=False, showticklabels=False
),
yaxis=dict(
title_text='Imeas - Icalc',
domain=[0, resid_height / full_height - 0.01],
range=[resid_y_min, resid_y_max],
tickvals=[int(resid_y_min), 0, int(resid_y_max)],
# nticks = 3,
showline=True, mirror=True, showgrid=False
),
yaxis2=dict(
Expand All @@ -877,10 +875,6 @@ def show_analysis_chart(self):
)

fig = go.Figure(data=data, layout=layout)

# fig.update_xaxes(showline=True, mirror=True)
# fig.update_yaxes(showline=True, mirror=True)

fig.show()

def print_free_parameters(self):
Expand Down
Loading