The supplied script `zzz_MakeJSON.py` is used to generate a JSON file for use with Stage 1 (Data Preparation).
**Important: Python uses zero-based numbering.** Python starts counting sequences with the first element as zero. You need to be aware of this when entering things like column locations in JSON files. For example the first column in your data table is column 0. If your x and y coordinates are in the third and fourth columns then you need to specify these as columns 2 and 3, respectively!
To generate a JSON file:
1. Open `zzz_MakeJSON.py`
2. Press F5 or click the green play-button to run the script. Watch the IPython Console for activity.
3. Answer the questions in the console as they appear.
4. Questions about the format and layout of your data:
- The file extension for data files. Remember, only data files should have this extension!
- The data-delimiter character. Usually this is comma or tab.
- The x-coordinates column *using zero-based numbering*
- The y-coordinates column *using zero-based numbering*
- The column (using zero-based numbering) with the cluster-membership data.
- For real data there won't be any such information so you need to enter `None` as your answer.
- The Channel ID column (using zero-based numbering).
- This is for future updates and is not currently used, so enter `None` as your answer.
- The column (using zero-based numbering) for each point's unique ID number
- If your points are not uniquely numbered, enter `None` as your answer. Unique IDs will be added by CAML later.
4. Questions about the xy(z) range of your data. This information is used when rendering images:
- Do you want CAML to estimate the range?
- If yes: you will be asked to which nearest order to round the axis limits. Accepting the default of the nearest 1000 nm usually works well.
- If no: you will be asked to supply the minimum and maximum values for each spatial coordinate. You will therefore need to know the minimum and maximum ranges of your data for all the supplied spatial dimensions (x and y). This can be determined from the field of view of your microscope, which are usually square and e.g. for a Nikon NSTORM at 160 nm/pixel and 256 x 256 pixel acquisition images provides a field of view 40960 nm in x and in y. Your reconstructed images will therefore generally always fit within 0 to 41000 nm range in x and y.
5. Questions on measuring distances; which near neighbours to start with and which to stop at.
- CAML will measure distances from each to point this nth nearest neighbour. Usually it's the first nearest neighbour, so enter 1 here.
- Distances will be measure to consecutive neighbouring points up until this nth nearest neighbour. Here this is either the 100th or 1000th neighbour. This will affect which model you can use for evaluation.
6. You will then be shown a summary of the answers you gave. If these are incorrect you can start the process again to fix any mistakes.
7. If the settings are correct you can save the JSON file. You will be asked to provide and folder and then to name the file.