generated from erosita/uds
	first run
This commit is contained in:
		| @@ -1,5 +1,10 @@ | |||||||
| datadir="./data" | """ | ||||||
| proddir="./products" | Предполагается, что скрипты запускаются непосредственно в директории scripts | ||||||
|  |  | ||||||
|  | Пути должны оканчиваться на / | ||||||
|  | """ | ||||||
|  | datadir="../data/" | ||||||
|  | proddir="../products/" | ||||||
|  |  | ||||||
| """ Определение областей "Галактика" и "Внегалактика" """ | """ Определение областей "Галактика" и "Внегалактика" """ | ||||||
| bmax=30.0 | bmax=30.0 | ||||||
|   | |||||||
| @@ -63,7 +63,7 @@ def plot_best_fit(X, y, model): | |||||||
|     y_pred = model.predict(X) |     y_pred = model.predict(X) | ||||||
|     resid = y - y_pred |     resid = y - y_pred | ||||||
|     err = np.sqrt(np.sum((resid)**2))/len(resid) |     err = np.sqrt(np.sum((resid)**2))/len(resid) | ||||||
|     print("ax+b: a={}, b={}, std={}".format(a,b,err)) |     print("ax+b: a={:.2e}, b={:.2e}, std={:.2f}".format(a,b,err)) | ||||||
|     """ |     """ | ||||||
|     plt.scatter(X, y) |     plt.scatter(X, y) | ||||||
|     xaxis = arange(X.min(), X.max(), 0.01) |     xaxis = arange(X.min(), X.max(), 0.01) | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								scripts/01_bgdmodel.py
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										4
									
								
								scripts/01_bgdmodel.py
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							| @@ -28,6 +28,7 @@ from ridge.config import * | |||||||
| enkey = sys.argv[1] | enkey = sys.argv[1] | ||||||
|  |  | ||||||
| fn="detcnts.{}.fits".format(enkey) | fn="detcnts.{}.fits".format(enkey) | ||||||
|  | print("Reading {}".format(datadir+fn)) | ||||||
|  |  | ||||||
| d = fits.getdata(datadir+fn) | d = fits.getdata(datadir+fn) | ||||||
| df=pd.DataFrame(np.array(d).byteswap().newbyteorder()) | df=pd.DataFrame(np.array(d).byteswap().newbyteorder()) | ||||||
| @@ -139,4 +140,5 @@ with open(proddir+fn.replace(".fits",".pkl"), 'wb') as fp: | |||||||
| with open(proddir+fn.replace(".fits",".ignored_scw.pkl"), 'wb') as fp: | with open(proddir+fn.replace(".fits",".ignored_scw.pkl"), 'wb') as fp: | ||||||
|     pickle.dump(ignored_scw, fp, protocol=pickle.HIGHEST_PROTOCOL) |     pickle.dump(ignored_scw, fp, protocol=pickle.HIGHEST_PROTOCOL) | ||||||
|  |  | ||||||
| print(ignored_scw) |  | ||||||
|  | print("Removed ScWs:",ignored_scw) | ||||||
|   | |||||||
							
								
								
									
										0
									
								
								scripts/01_bgdmodel.sh
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										0
									
								
								scripts/01_bgdmodel.sh
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
		Reference in New Issue
	
	Block a user