Skip to content
Snippets Groups Projects
Commit 5e02d370 authored by casagran's avatar casagran
Browse files

Merge branch '6-py-bkg-rm' of https://gitlab.esrf.fr/graintracking/dct into 6-py-bkg-rm

parents 199c5aef fb3b6092
No related branches found
No related tags found
1 merge request!6Draft: Resolve "py-bkg-rm"
......@@ -380,7 +380,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.4"
"version": "3.9.5"
}
},
"nbformat": 4,
......
%% Cell type:code id:aa5dea9f-c037-4f52-a1e0-78c1f68f5361 tags:
``` python
from silx.io import get_data
from silx.io.dictdump import dicttoh5
```
%% Cell type:code id:3b211988-44b8-4b3d-975e-9bd4f638a52d tags:
``` python
%cd ~/data/ET11_3_dct_0_z0_/
```
%% Output
/home/kscroot/data/ET11_3_dct_0_z0_
%% Cell type:code id:0073c304-c532-4f8e-8a07-d3e285ae80ab tags:
``` python
%ls
```
%% Output
ET11_3_dct_0_z0_.nxs ET11_3_dct_0_z0_.par.md5 pre_ref.nxs.md5
ET11_3_dct_0_z0_.nxs.md5 post_dark.nxs.md5
ET11_3_dct_0_z0_.par post_ref.nxs.md5
%% Cell type:code id:baf032c0-3d3e-41cf-9e40-e804269a6179 tags:
``` python
from pathlib import Path
```
%% Cell type:code id:d1606a28-fb62-46b6-861d-89f539daf283 tags:
``` python
filepath = Path(".") / "ET11_3_dct_0_z0_.nxs"
datalink = "/flyscan_00001/scan_data/orca_image"
```
%% Cell type:code id:6841f3d3-f2c2-4c64-94e8-3468cb5b0b75 tags:
``` python
data = get_data(f"silx:{str(filepath)}::{datalink}")
```
%% Cell type:code id:54a37ca1-29ab-4107-8c4d-ec9517c11a50 tags:
``` python
data.shape
```
%% Output
(3600, 2048, 2048)
%% Cell type:code id:3f7e3203-b013-49bb-8505-7b09ca8ba325 tags:
``` python
reduced = data[:60]
```
%% Cell type:code id:dd22f2d7-e0cc-47e9-87f2-524b932d1ce5 tags:
``` python
reduced_datalink = "/reduced"
```
%% Cell type:code id:fdd70dc0-27ff-475b-aa15-d7e63aae0661 tags:
``` python
dicttoh5(
dict(raw=reduced),
str(filepath),
reduced_datalink,
mode="a",
update_mode="add",
)
```
%% Cell type:code id:600a505c-b621-4276-9720-7e9920a3e8cd tags:
``` python
%pwd
```
%% Output
'/home/kscroot/data/ET11_3_dct_0_z0_'
%% Cell type:raw id:5ba72298-2ab1-4b1e-af72-1639e651e473 tags:
url to the reduced data
%% Cell type:raw id:649c0588-016f-40b0-afa0-b495bf1d1f27 tags:
silx:/home/kscroot/data/ET11_3_dct_0_z0_/ET11_3_dct_0_z0_.nxs::/reduced/raw
%% Cell type:code id:7f9adb80-b3a5-434b-85bc-0b61e5e5c710 tags:
``` python
```
#from enum
scp com-psiche@195.221.7.39:/nfs/ruche-psiche/psiche-soleil/com-psiche/proposal/2020/Proudhon_0320/ET11_3_dct_0_z0_ .
scp com-psiche@195.221.7.39:/nfs/ruche-psiche/psiche-soleil/com-psiche/proposal/2020/Proudhon_0320/ET11_3_dct_0_z0_/post_dark.nxs . && \
scp com-psiche@195.221.7.39:/nfs/ruche-psiche/psiche-soleil/com-psiche/proposal/2020/Proudhon_0320/ET11_3_dct_0_z0_/post_ref.nxs . && \
scp com-psiche@195.221.7.39:/nfs/ruche-psiche/psiche-soleil/com-psiche/proposal/2020/Proudhon_0320/ET11_3_dct_0_z0_/pre_ref.nxs .
mkdir ET11_3_dct_0_z1_ && scp com-psiche@195.221.7.39:/nfs/ruche-psiche/psiche-soleil/com-psiche/proposal/2020/Proudhon_0320/ET11_3_dct_0_z1_/* ET11_3_dct_0_z1_
scp com-psiche@195.221.7.39:/nfs/ruche-psiche/psiche-soleil/com-psiche/proposal/2020/Proudhon_0320/ET11_3_dct_0_z0_.tar.gz . && \
scp com-psiche@195.221.7.39:/nfs/ruche-psiche/psiche-soleil/com-psiche/proposal/2020/Proudhon_0320/ET11_3_dct_0_z1_.tar.gz . && \
scp com-psiche@195.221.7.39:/nfs/ruche-psiche/psiche-soleil/com-psiche/proposal/2020/Proudhon_0320/ET11_3_dct_0_z2_.tar.gz .
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