nm_training_placeholder
Placeholder code snippets for noise model training integration.
This module contains template/placeholder code that demonstrates how noise model training could be integrated into CAREamist. These are reference implementations and should not be imported or used directly.
__init__(self, source, work_dir=None, callbacks=None, enable_progress_bar=True) #
Placeholder init method showing noise model initialization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
self | object | CAREamist instance. | required |
source | Union[Path, str, Configuration] | Configuration source. | required |
work_dir | Union[Path, str] | None | Working directory, by default None. | None |
callbacks | list[Callback] | None | List of callbacks, by default None. | None |
enable_progress_bar | bool | Whether to show progress bar, by default True. | True |
Source code in src/careamics/nm_training_placeholder.py
train_noise_model(self, clean_data, noisy_data, learning_rate=0.1, batch_size=250000, n_epochs=2000, lower_clip=0.0, upper_clip=100.0, save_noise_models=True) #
Train noise models from clean/noisy data pairs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
self | object | CAREamist instance. | required |
clean_data | Union[Path, str, NDArray] | Clean (signal) data for training noise models. | required |
noisy_data | Union[Path, str, NDArray] | Noisy (observation) data for training noise models. | required |
learning_rate | float | Learning rate for noise model training. | 1e-1 |
batch_size | int | Batch size for noise model training. | 250000 |
n_epochs | int | Number of epochs for noise model training. | 2000 |
lower_clip | float | Lower percentile for clipping training data. | 0.0 |
upper_clip | float | Upper percentile for clipping training data. | 100.0 |
save_noise_models | bool | Whether to save trained noise models to disk. | True |
Raises:
| Type | Description |
|---|---|
ValueError | If noise models are not initialized for training. |
ValueError | If data shapes don't match expectations. |
Source code in src/careamics/nm_training_placeholder.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | |