pairs.py
calculate_m_metric(flux_a, flux_b)
¶
Calculate the m variability metric which is the modulation index between two fluxes. This is proportional to the fractional variability. See Section 5 of Mooley et al. (2016) for details, DOI: 10.3847/0004-637X/818/2/105.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
flux_a | float | flux value "A". | required |
flux_b | float | flux value "B". | required |
Returns:
Name | Type | Description |
---|---|---|
float | float | the m metric for flux values "A" and "B". |
Source code in vast_pipeline/pipeline/pairs.py
33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
calculate_measurement_pair_metrics(df, n_cpu=0, max_partition_mb=15)
¶
Generate a DataFrame of measurement pairs and their 2-epoch variability metrics from a DataFrame of measurements. For more information on the variability metrics, see Section 5 of Mooley et al. (2016), DOI: 10.3847/0004-637X/818/2/105.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df | DataFrame | Input measurements. Must contain columns: id, source, flux_int, flux_int_err, flux_peak, flux_peak_err, has_siblings. | required |
n_cpu | int | The desired number of workers for Dask | 0 |
max_partition_mb | int | The desired maximum size (in MB) of the partitions for Dask. | 15 |
Returns:
Type | Description |
---|---|
DataFrame | Measurement pairs and 2-epoch metrics. Will contain columns: source - the source ID id_a, id_b - the measurement IDs flux_int_a, flux_int_b - measurement integrated fluxes in mJy flux_int_err_a, flux_int_err_b - measurement integrated flux errors in mJy flux_peak_a, flux_peak_b - measurement peak fluxes in mJy/beam flux_peak_err_a, flux_peak_err_b - measurement peak flux errors in mJy/beam vs_peak, vs_int - variability t-statistic m_peak, m_int - variability modulation index |
Source code in vast_pipeline/pipeline/pairs.py
48 49 50 51 52 53 54 55 56 57 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 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
|
calculate_vs_metric(flux_a, flux_b, flux_err_a, flux_err_b)
¶
Calculate the Vs variability metric which is the t-statistic that the provided fluxes are variable. See Section 5 of Mooley et al. (2016) for details, DOI: 10.3847/0004-637X/818/2/105.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
flux_a | float | flux value "A". | required |
flux_b | float | flux value "B". | required |
flux_err_a | float | error of | required |
flux_err_b | float | error of | required |
Returns:
Name | Type | Description |
---|---|---|
float | float | the Vs metric for flux values "A" and "B". |
Source code in vast_pipeline/pipeline/pairs.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|