Update app.py
Browse files
app.py
CHANGED
|
@@ -132,24 +132,24 @@ if uploaded_file is not None:
|
|
| 132 |
image = np.log10(data+1)
|
| 133 |
plot_image(image, scale)
|
| 134 |
|
| 135 |
-
if detect:
|
| 136 |
-
|
| 137 |
-
|
| 138 |
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
|
| 152 |
-
|
| 153 |
|
| 154 |
# ccd = CCDData(y_pred, unit="adu", wcs=wcs)
|
| 155 |
# ccd.write("predicted.fits", overwrite=True)
|
|
|
|
| 132 |
image = np.log10(data+1)
|
| 133 |
plot_image(image, scale)
|
| 134 |
|
| 135 |
+
# if detect:
|
| 136 |
+
# data, wcs = cut(data, wcs, scale=scale)
|
| 137 |
+
# image = np.log10(data+1)
|
| 138 |
|
| 139 |
+
# y_pred = 0
|
| 140 |
+
# for j in [0,1,2,3]:
|
| 141 |
+
# rotated = np.rot90(image, j)
|
| 142 |
+
# pred = model.predict(rotated.reshape(1, 128, 128, 1)).reshape(128 ,128)
|
| 143 |
+
# pred = np.rot90(pred, -j)
|
| 144 |
+
# y_pred += pred / 4
|
| 145 |
+
|
| 146 |
+
# # Thresholding
|
| 147 |
+
# y_pred = np.where(y_pred > 0.4, y_pred, 0)
|
| 148 |
+
|
| 149 |
+
# # if decompose:
|
| 150 |
+
# # cavs = decompose_cavity(y_pred, )
|
| 151 |
|
| 152 |
+
# plot_prediction(y_pred, decompose)
|
| 153 |
|
| 154 |
# ccd = CCDData(y_pred, unit="adu", wcs=wcs)
|
| 155 |
# ccd.write("predicted.fits", overwrite=True)
|