query
stringlengths
9
9.05k
document
stringlengths
10
222k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
4
10
document_rank
stringclasses
2 values
Approximate a contour within a number of pixels, so it isn't too fine in the corner and snap to edges
def approx_snap_contour(contour, width, height, epsilon=20, snap_dist=5): # approximate contour within epsilon pixels, # so it isn't too fine in the corner # and snap to edges approx = cv2.approxPolyDP(contour, epsilon, True) for i in range(approx.shape[0]): for j in [0, width]: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_contour(ctx: Context):\n cv2.copyTo(ctx.filter_image, np.ones_like(ctx.temp_image1), ctx.temp_image1)\n contours, _ = cv2.findContours(ctx.temp_image1, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)\n\n # take the 5 biggest areas\n contours = sorted(contours, key=lambda c: math.fabs(cv2.contourAr...
[ "0.7044465", "0.65653694", "0.64290446", "0.6350748", "0.6285811", "0.6277533", "0.62509614", "0.6220645", "0.6214892", "0.61171716", "0.6086233", "0.6068965", "0.6009111", "0.6007028", "0.60060155", "0.59805775", "0.59533876", "0.59395546", "0.58808744", "0.58717704", "0.584...
0.6652095
1
create a PSLG (Planar Straight Line Graph) based on a masked image
def create_PSLG(tile_width, tile_height, maskUrl): # define a PSLG for triangle # http://dzhelil.info/triangle/definitions.html # https://www.cs.cmu.edu/~quake/triangle.defs.html#pslg if maskUrl is None: vertices = np.array([ [0, 0], [0, tile_height], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lapsharp(image, maskret = False):\n #padded_image = np.pad(img, (1, 1), mode = 'symmetric')\n # lap is linear therefore;\n # lap f(x,y) = f(x + 1, y) + f(x - 1, y) + f(x, y + 1) + f(x, y - 1) - 4f(x,y)...\n #--------------------\n c = -1 # Depends on kernel\n # make ze...
[ "0.57113254", "0.54571867", "0.5446928", "0.5442727", "0.5425521", "0.54168373", "0.5341401", "0.5331775", "0.5285795", "0.52686006", "0.52438134", "0.5190934", "0.51900005", "0.51891404", "0.5180654", "0.51511735", "0.513599", "0.5114727", "0.51131284", "0.51031023", "0.5096...
0.64216834
0
triangulate a mesh based on a Planar Straight Line Graph with mesh constraints. Return either the Delaunay triangulation or a difference in number of triangles from a target.
def calculate_mesh(a, bbox, target, get_t=False): # FIXME target/get_t is ugly t = triangle.triangulate(bbox, 'pqa%0.1f' % a) if get_t: # scipy.Delaunay has nice find_simplex method, # but, no obvious way to iteratively refine meshes, like triangle # numbering is different, so, switc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def triangulate(self):\n npts = self._vertices.shape[0]\n if np.any(self._vertices[0] != self._vertices[1]):\n # start != end, so edges must wrap around to beginning.\n edges = np.empty((npts, 2), dtype=np.uint32)\n edges[:, 0] = np.arange(npts)\n edges[:, ...
[ "0.65700537", "0.65467316", "0.63208395", "0.6228135", "0.61794144", "0.60350543", "0.5979879", "0.57405955", "0.57298803", "0.5646325", "0.5568803", "0.5567217", "0.5557388", "0.5554732", "0.553646", "0.5484179", "0.5482841", "0.54236656", "0.5405412", "0.5374563", "0.536117...
0.67103577
0
legacy function to compute barycentric coordinates on mesh
def compute_barycentrics_legacy(coords, mesh): # https://en.wikipedia.org/wiki/Barycentric_coordinate_system#Conversion_between_barycentric_and_Cartesian_coordinates triangle_indices = mesh.find_simplex(coords) vt = np.vstack(( np.transpose(mesh.points), np.ones(mesh.points.shape[0]))) m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_barycentrics_native(coords, mesh):\n triangle_indices = mesh.find_simplex(coords)\n X = mesh.transform[triangle_indices, :2]\n Y = coords - mesh.transform[triangle_indices, 2]\n b = np.einsum('ijk,ik->ij', X, Y)\n bcoords = np.c_[b, 1 - b.sum(axis=1)]\n return bcoords, triangle_indice...
[ "0.7360065", "0.6692308", "0.66506594", "0.66266865", "0.65614957", "0.6556327", "0.64772445", "0.64191896", "0.63419336", "0.63191396", "0.6296263", "0.6246168", "0.6213385", "0.6160843", "0.6048742", "0.6029008", "0.59960204", "0.5982496", "0.5929091", "0.5885589", "0.58779...
0.72317815
1
convert coordinates to barycentric coordinates on mesh
def compute_barycentrics_native(coords, mesh): triangle_indices = mesh.find_simplex(coords) X = mesh.transform[triangle_indices, :2] Y = coords - mesh.transform[triangle_indices, 2] b = np.einsum('ijk,ik->ij', X, Y) bcoords = np.c_[b, 1 - b.sum(axis=1)] return bcoords, triangle_indices
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_barycentrics_legacy(coords, mesh):\n # https://en.wikipedia.org/wiki/Barycentric_coordinate_system#Conversion_between_barycentric_and_Cartesian_coordinates\n triangle_indices = mesh.find_simplex(coords)\n vt = np.vstack((\n np.transpose(mesh.points),\n np.ones(mesh.points.shape[0...
[ "0.6712918", "0.6559699", "0.6532559", "0.649927", "0.64598477", "0.6445929", "0.63104147", "0.5988195", "0.5923556", "0.59055173", "0.5781909", "0.57353014", "0.57309574", "0.57309574", "0.57155395", "0.56864864", "0.56807077", "0.5660251", "0.56479573", "0.5623852", "0.5621...
0.68983036
0
create sparse regularization matrix with distinct translation and lens regularization factors
def create_regularization(ncols, ntiles, defaultL, transL, lensL): # regularizations: [affine matrix, translation, lens] reg = np.ones(ncols).astype('float64') * defaultL reg[0: (ntiles * 3)] *= transL reg[(ntiles * 3):] *= lensL rmat = sparse.eye(reg.size, dtype='float64', format='csr') rmat.da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_return_sparse():\n X = Vectorizer(strategy=\"bow\", return_sparse=True).fit_transform(X_text, y10)\n assert all(pd.api.types.is_sparse(X[c]) for c in X.columns)", "def expansion_matrix_dl(self):\n\n row = self._base_nlp._lower_d_map\n nnz = len(self._base_nlp._lower_d_map)\n c...
[ "0.6062962", "0.60224247", "0.6014099", "0.5942223", "0.59386283", "0.59351116", "0.592298", "0.581888", "0.57811105", "0.57662123", "0.576372", "0.5762746", "0.56897646", "0.5650547", "0.56298316", "0.5621713", "0.5604098", "0.5598153", "0.55651486", "0.5555536", "0.55403036...
0.7732704
0
create 2D Thin Plate Spline transform required to transform mesh to the solution derived from em_stitch.lens_correction.mesh_and_solve_transform.solve
def create_thinplatespline_tf( mesh, solution, lens_dof_start, logger=default_logger, compute_affine=False): dst = np.zeros_like(mesh.points) dst[:, 0] = mesh.points[:, 0] + solution[0][lens_dof_start:] dst[:, 1] = mesh.points[:, 1] + solution[1][lens_dof_start:] transf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def InterpolateSurfaceVectorsWithLine():\r\n # Load Surface Mesh Data and generate normals\r\n VTKString = OpenData('C:/Users/Tim/Documents/University/Year 4/Final Project/FinalYearProjectCode/TEH_Code/InputFiles','muscle_surface.vtk')\r\n header, PointData, PolygonData = CreateMatrixVTK(VTKString)\r\n ...
[ "0.5762129", "0.564785", "0.5639813", "0.54684335", "0.54562634", "0.5422074", "0.53735185", "0.53548485", "0.53224355", "0.53117657", "0.5297818", "0.52756864", "0.5227991", "0.5213809", "0.5165143", "0.51585805", "0.5146696", "0.5142601", "0.513898", "0.5131232", "0.5125101...
0.69265705
0
create a copy of each tilespec in tilespecs with the first transform being a reference to ref_transform and the second based on transforms provided in transforms. This likely expects a single transformation in the input tilespecs.
def new_specs_with_tf(ref_transform, tilespecs, transforms): newspecs = [] for i in range(len(tilespecs)): newspecs.append(copy.deepcopy(tilespecs[i])) newspecs[-1].tforms.insert(0, renderapi.transform.ReferenceTransform( ref...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_transforms(ntiles, solution):\n rtransforms = []\n for i in range(ntiles):\n rtransforms.append(renderapi.transform.AffineModel(\n B0=solution[0][i],\n B1=solution[1][i]))\n return rtransforms", "def CreateCompositeTransforms(tps, out...
[ "0.58566356", "0.5676096", "0.554797", "0.5438042", "0.5400686", "0.53560275", "0.5307504", "0.52687067", "0.5248383", "0.5243316", "0.5194101", "0.5160935", "0.512651", "0.5046139", "0.5030707", "0.50197345", "0.50197345", "0.50077504", "0.5006342", "0.5004479", "0.49986902"...
0.80556047
0
compile results, statistics, and messages for reporting information about lens correction solves
def report_solution(errx, erry, transforms, criteria): translation = np.array([tf.translation for tf in transforms]) jresult = {} jresult['x_res_min'] = errx.min() jresult['x_res_max'] = errx.max() jresult['x_res_mean'] = errx.mean() jresult['x_res_std'] = errx.std() jresult['y_res_min'] = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def automatic_results(self):\n self.find_coefficients()\n self.calculate_numerical_solution()\n self.plot_solution()\n self.L2_norm()", "def check():\n \n overall_report = dict()\n\n # source code analysis\n # ====================\n # currently empty\n \n # compil...
[ "0.6543959", "0.63866574", "0.6272614", "0.61623067", "0.58692783", "0.58659387", "0.58639663", "0.5846593", "0.58382267", "0.58322173", "0.58289295", "0.5828766", "0.58053786", "0.57570446", "0.57435733", "0.572747", "0.5719996", "0.5716339", "0.5716339", "0.57155836", "0.57...
0.6567359
0
estimate affine transformation between translation components of tiles in t0 and tiles in t1 to give overall stage affine transformation.
def estimate_stage_affine(t0, t1): src = np.array([t.tforms[0].translation for t in t0]) dst = np.array([t.tforms[1].translation for t in t1]) aff = renderapi.transform.AffineModel() aff.estimate(src, dst) return aff
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def affine_trans(self):\n h, w, _ = self.img.shape\n\n \"\"\"\n pts1 = np.float32(\n [\n [randint(0, rows), randint(0, cols)],\n [randint(0, rows), randint(0, cols)],\n [randint(0, rows), randint(0, cols)],\n ]\n )\n ...
[ "0.6594597", "0.6143597", "0.6103843", "0.6059543", "0.6057212", "0.601662", "0.5966459", "0.59375066", "0.5928144", "0.5772878", "0.57699436", "0.5741389", "0.5725141", "0.57243896", "0.5676816", "0.5661593", "0.5613389", "0.5603021", "0.5598419", "0.55949974", "0.55909306",...
0.80707216
0
create mesh with a given number of vertices based on example tiles and pointmatches
def _create_mesh(resolvedtiles, matches, nvertex, return_area_triangle_par=False, **kwargs): remove_weighted_matches(matches, weight=0.0) tilespecs = resolvedtiles.tilespecs example_tspec = tilespecs[0] tile_width = example_tspec.width tile_height = example_tspec.height maskU...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createMesh(width, height):\r\n mesh = [(x,y) for x in range(0, width+1) for y in range(0,height+1)]\r\n return mesh", "def compute_mesh(nrow, ncol, nele):\n tri_index = np.zeros((nele, 3))\n for i in range(nrow-1):\n for j in range(NUM):\n if j == 0:\n tri_index[i...
[ "0.63886917", "0.63265324", "0.61875033", "0.6186799", "0.60914326", "0.60818446", "0.60053647", "0.5964674", "0.5952059", "0.58961856", "0.58941364", "0.5891929", "0.58738023", "0.58270764", "0.5782975", "0.5761651", "0.57578397", "0.57421577", "0.5739657", "0.57015", "0.569...
0.7204293
0
generate lens correction from resolvedtiles and pointmatches
def _solve_resolvedtiles( resolvedtiles, matches, nvertex, regularization_lambda, regularization_translation_factor, regularization_lens_lambda, good_solve_dict, logger=default_logger, **kwargs): # FIXME this is done twice -- think through tilespecs = resolvedtiles.tilespecs ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def refl_analysis(self,dials_model):\n Z = self.refl_table\n indices = Z['miller_index']\n expts = ExperimentListFactory.from_json_file(dials_model,\n check_format=False)\n self.dials_model=expts[0]\n CRYS = self.dials_model.crystal\n UC = CRYS.get_uni...
[ "0.6055289", "0.59696704", "0.59555453", "0.59381825", "0.5891207", "0.5845494", "0.5833058", "0.5707867", "0.5662823", "0.5652439", "0.5634461", "0.56329143", "0.5628589", "0.5605185", "0.55699515", "0.55539644", "0.5553876", "0.55182993", "0.550805", "0.54918754", "0.548743...
0.59943163
1
Train the neural network using minibatch stochastic gradient descent. The ``training_data`` is a list of tuples ``(x, y)`` representing the training inputs and the desired outputs. The other nonoptional parameters are selfexplanatory, as is the regularization parameter ``lmbda``. The method also accepts ``evaluation_da...
def SGD(self, training_data, epochs, mini_batch_size, eta, lmbda = 0.0, evaluation_data=None, monitor_evaluation_cost=True, monitor_evaluation_accuracy=True, monitor_training_cost=True, monitor_training_accuracy=True): if evaluation_data: n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SGD(self, training_data, epochs, mini_batch_size, eta,\n lmbda=0.0,\n evaluation_data=None,\n is_list_weights=False,\n monitor_evaluation_cost=False,\n monitor_evaluation_accuracy=False,\n monitor_training_cost=False,\n monitor_traini...
[ "0.75322276", "0.59086055", "0.5894418", "0.5865825", "0.5839547", "0.58115965", "0.57872933", "0.5713776", "0.5687963", "0.5618542", "0.5568382", "0.5566811", "0.55400455", "0.55272126", "0.5521674", "0.55146223", "0.5494727", "0.54137766", "0.54126596", "0.5405293", "0.5402...
0.7129835
1
Update the network's weights and biases by applying gradient descent using backpropagation to a single mini batch. The ``mini_batch`` is a list of tuples ``(x, y)``, ``eta`` is the learning rate, ``lmbda`` is the regularization parameter, and ``n`` is the total size of the training data set.
def update_mini_batch(self, mini_batch, eta, lmbda, n): nabla_b = [np.zeros(b.shape) for b in self.biases] nabla_w = [np.zeros(w.shape) for w in self.weights] for x, y in mini_batch: delta_nabla_b, delta_nabla_w = self.backprop(x, y) nabla_b = [nb+dnb for nb, dnb in zip(n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _update_mini_batch(self, data_batch, labs_batch, eta, lmbda, n):\n # forward data through the net\n affines, activations = self._propagate(data_batch)\n # back propagate and calculate gradient on the whole batch\n nabla_b, nabla_w = self._backprop(affines, activations, labs_batch)\n...
[ "0.7906571", "0.7544896", "0.7494456", "0.7272462", "0.71009153", "0.7091805", "0.6828204", "0.6778019", "0.6643697", "0.6588741", "0.64951116", "0.64833266", "0.6477984", "0.64513063", "0.64224535", "0.6420076", "0.6412564", "0.63438123", "0.6299802", "0.629197", "0.6234695"...
0.8509255
0
Return the number of inputs in ``data`` for which the neural network outputs the correct result. The neural network's output is assumed to be the index of whichever neuron in the final layer has the highest activation. The flag ``convert`` should be set to False if the data set is validation or test data (the usual cas...
def accuracy(self, data, convert=False): if convert: results = [(np.argmax(self.feedforward(x)), np.argmax(y)) for (x, y) in data] else: results = [(np.argmax(self.feedforward(x)), y) for (x, y) in data] return sum(int(x == y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def classify(self, data):\n\n \"*** YOUR CODE HERE ***\"\n # should compute (validationData[i] - trainingData[j])^2\n result = np.zeros(data.shape[0])\n for i in range(data.shape[0]):\n distances = np.linalg.norm(self.trainingData - data[i], axis=1)\n nearest = np....
[ "0.55418044", "0.5268434", "0.52642727", "0.51912147", "0.50543463", "0.505405", "0.50440305", "0.50427884", "0.50192684", "0.49939692", "0.49765176", "0.4974678", "0.49537104", "0.4950577", "0.4910801", "0.48917764", "0.4889661", "0.48895195", "0.48796698", "0.48656094", "0....
0.6879109
0
Retrieves meter data in the specified time interval
def get_meter_data_for_time_slice(apt_no, start_time, end_time): if apt_no in ['102A', 102]: apt_no = '102A' logger.debug("sMap: Getting meter data for %s between %s and %s", apt_no, start_time, end_time) query = ("select data in ('" + str(start_time) + "','" + str(end_time) + "') " "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_meter_data(query):\n\n logger.debug(\"sMap: Getting meter data...\")\n r = requests.post(url, data=query)\n logger.debug(\"%s\", r)\n payload = r.json()\n logger.debug(\"%s\", payload)\n\n return payload", "def automatic_meter_reading_demo():\n\n\t#Get sensor data from ellitrack\n\tseri...
[ "0.6458253", "0.6207483", "0.6140492", "0.6054454", "0.5893672", "0.5880416", "0.5815855", "0.57970387", "0.5740576", "0.57049954", "0.56961805", "0.5673611", "0.5665246", "0.56586474", "0.56508857", "0.5603684", "0.5591565", "0.5591066", "0.55890787", "0.55879784", "0.557850...
0.63369703
1
Get meter info from smap server
def get_meter_info(apt_no): if apt_no in ['102A', 102]: apt_no = '102A' payload = ("select uuid, Metadata/Instrument/SupplyType " "where Metadata/LoadLocation/FlatNumber ='" + str(apt_no) + "' and " "Metadata/Extra/PhysicalParameter='Power'") r = requests.post(url, dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_meter_data(query):\n\n logger.debug(\"sMap: Getting meter data...\")\n r = requests.post(url, data=query)\n logger.debug(\"%s\", r)\n payload = r.json()\n logger.debug(\"%s\", payload)\n\n return payload", "def inspect_instance(self):\n url = \"http://%s:1337/metrics\" % self.hos...
[ "0.6534766", "0.57748735", "0.5685235", "0.5639367", "0.562041", "0.5553153", "0.5548551", "0.5517194", "0.5498753", "0.54779524", "0.54554343", "0.54542905", "0.5428854", "0.5425675", "0.5403411", "0.53882486", "0.5383454", "0.53514", "0.5339388", "0.5325049", "0.5322893", ...
0.58871216
1
Should return cero for sales without payments
def test_total_payments_in_cero(self): sale = SaleFactory(total_value=100) self.assertEqual(sale.total_payments, 0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_total_invoices_in_cero(self):\n sale = SaleFactory(total_value=100)\n self.assertEqual(sale.total_invoices, 0)", "def get_sale_price(self):\n Currency = Pool().get('currency.currency')\n Company = Pool().get('company.company')\n\n if self.carrier_cost_method != 'gls':\...
[ "0.6457909", "0.5964824", "0.59259886", "0.58878726", "0.5862776", "0.5836889", "0.5826227", "0.5668383", "0.566295", "0.55943793", "0.5592072", "0.55517393", "0.5536478", "0.5510682", "0.5451416", "0.54119945", "0.5400981", "0.5395753", "0.53791726", "0.53651094", "0.5352794...
0.694598
0
Should return cero for sales without invoices
def test_total_invoices_in_cero(self): sale = SaleFactory(total_value=100) self.assertEqual(sale.total_invoices, 0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_total_payments_in_cero(self):\n sale = SaleFactory(total_value=100)\n self.assertEqual(sale.total_payments, 0)", "def _prepare_invoice(self):\n self.ensure_one()\n result = super(SaleOrder, self)._prepare_invoice()\n result.update({\n 'cost_center_id': self....
[ "0.6145988", "0.5830057", "0.5784385", "0.5687257", "0.5639387", "0.55948", "0.5516878", "0.54828346", "0.5469577", "0.5413175", "0.53952765", "0.5365114", "0.53400594", "0.53141826", "0.52994025", "0.5297573", "0.529418", "0.52834255", "0.5282834", "0.5275581", "0.5273625", ...
0.6910646
0
Should return total value for invoices of sale
def test_total_invoices(self): sale = SaleFactory(total_value=1000) InvoiceFactory(sale=sale, total_value=50) InvoiceFactory(sale=sale, total_value=500) self.assertEqual(sale.total_invoices, 550)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sub_total():\n return sum(SAVE_PRICE)", "def test_total_invoices_in_cero(self):\n sale = SaleFactory(total_value=100)\n self.assertEqual(sale.total_invoices, 0)", "def summarize_invoice(line_items):\n sku_summary = AtlasClient.summarize_invoice_items_by_sku(line_items)\n total = 0\n ...
[ "0.7253602", "0.7189803", "0.69951934", "0.68230385", "0.67999244", "0.6738226", "0.673106", "0.6718466", "0.66987544", "0.6692853", "0.6662462", "0.6617523", "0.6612786", "0.6567203", "0.65502614", "0.6515595", "0.6512526", "0.6512426", "0.6458457", "0.64583737", "0.64418113...
0.73585117
0
Generate the name of a place, neatly formatted.
def get_formatted_place(city, country): place = f"{city} {country}" return place.title()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self) -> str:\r\n return f\"{NAME}: {self.location_name}\"", "def _build_title(db, place):\n descr = place.get_title()\n location = get_main_location(db, place)\n parish = location.get(PlaceType.PARISH)\n city = location.get(PlaceType.CITY)\n state = location.get(PlaceType.STATE)\n...
[ "0.6942746", "0.6923705", "0.67334574", "0.66503733", "0.66085255", "0.65899956", "0.65693015", "0.65075284", "0.6505252", "0.64646155", "0.64359766", "0.6424892", "0.640848", "0.6386427", "0.6382737", "0.63500804", "0.634088", "0.6317958", "0.6317793", "0.6260263", "0.624762...
0.7135558
0
Retrieves product name for a given product_id from redsky.target.com
def fetch_name(self, product_id): product_url = urljoin(self.endpoint, str(product_id)) + "?excludes={}".format(self.excludes) + "&key={}".format(self.key) result = requests.get(product_url) if result.status_code != requests.codes["ok"]: raise ProductNotFoundError("could not find p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_product(conn, product_id: int) -> str:\n with conn.cursor() as cursor:\n cursor.execute(\"\"\"select name from products\n where id = {0}\"\"\".format(product_id))\n try:\n return cursor.fetchone()[0]\n except TypeError:\n raise er...
[ "0.7151575", "0.7073232", "0.68963957", "0.67611766", "0.6730489", "0.66617584", "0.66555005", "0.66206634", "0.6618648", "0.65587276", "0.6444305", "0.63914", "0.6256572", "0.62551016", "0.62208354", "0.6209725", "0.6200292", "0.6186337", "0.6170252", "0.61694807", "0.614141...
0.7573008
0
Given a folder with images, load the images and your best model to predict the facial expression of each image.
def test_fer_model(img_folder, model_path="saved_models/best_model_Q5.pkl"): preds = None ### Start your code here subtract_mean = True root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) model_path = os.path.join(root_path, model_path) # Load model with open...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_deep_fer_model(img_folder, model_path=\"saved_models/best_model_Q6.h5\"):\n preds = None\n\n ### Start your code here\n \n #getting folder names and sorting the folder names in lexographic order\n images_list = os.listdir(img_folder)\n images_list.sort()\n \n n_pictures = 0\n fo...
[ "0.68706524", "0.6797775", "0.67382896", "0.6719086", "0.6689692", "0.65704817", "0.6502803", "0.6463969", "0.6403019", "0.637514", "0.6371763", "0.6369687", "0.63408184", "0.6304383", "0.63002694", "0.62955195", "0.6253565", "0.62364006", "0.62325126", "0.6229707", "0.622029...
0.71496236
0
Given a folder with images, load the images and your best model to predict the facial expression of each image.
def test_deep_fer_model(img_folder, model_path="saved_models/best_model_Q6.h5"): preds = None ### Start your code here #getting folder names and sorting the folder names in lexographic order images_list = os.listdir(img_folder) images_list.sort() n_pictures = 0 for filename in ima...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_fer_model(img_folder, model_path=\"saved_models/best_model_Q5.pkl\"):\n preds = None\n\n ### Start your code here\n\n subtract_mean = True\n \n root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))\n model_path = os.path.join(root_path, model_path)\n \n # Load mo...
[ "0.71496236", "0.6797775", "0.67382896", "0.6719086", "0.6689692", "0.65704817", "0.6502803", "0.6463969", "0.6403019", "0.637514", "0.6371763", "0.6369687", "0.63408184", "0.6304383", "0.63002694", "0.62955195", "0.6253565", "0.62364006", "0.62325126", "0.6229707", "0.622029...
0.68706524
1
Expands input into a list of antenna numbers.
def makeAntList(ants, subarray=DEFAULT) : if list == type(ants) : if ants.count(0) > 0: ants = 0 if ants == 0: return currentAntennaNumbers(subarray) else : return helpers.makeList(ants)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def antennasByType(ants=0) :\n ovroAnts = []\n bimaAnts = []\n szaAnts = []\n antlist = makeAntList(ants)\n for a in antlist :\n if device.CarmaAnt().isOvro(a) : ovroAnts.append(a)\n elif device.CarmaAnt().isBima(a) : bimaAnts.append(a)\n elif device.CarmaAnt().isSza(a) : sz...
[ "0.5312498", "0.5126782", "0.51095736", "0.5092281", "0.5059282", "0.5059282", "0.5014258", "0.49744803", "0.49620077", "0.49294287", "0.49267617", "0.4884418", "0.48830196", "0.4879887", "0.4877405", "0.4853344", "0.4837198", "0.48199734", "0.48183477", "0.47839305", "0.4777...
0.5700957
0
Helper method to return a string with a label (Antenna(s) and the list of antennas.
def makeAntString(ants): st = "Antenna" antlist = makeAntList(ants) if len(antlist) > 1: st += "s" st += " %s"%helpers.formatAsRanges( antlist ) return st
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def currentAntennaNames(carmaOnly=False) :\n a=s.getAntennaAssignments()\n namelist = []\n for i in a:\n cname = i.carmaAntennaName\n tname = i.typedAntennaName\n if (carmaOnly) :\n names = i.carmaAntennaName\n else :\n names = \"%s(%s)\" %(cname,tname)\n ...
[ "0.6120384", "0.60928404", "0.5999189", "0.58132726", "0.5765567", "0.57204473", "0.56962866", "0.565839", "0.5643897", "0.5634704", "0.56077904", "0.5595125", "0.55816", "0.55691564", "0.5559609", "0.55168414", "0.5495347", "0.5480425", "0.5462565", "0.545816", "0.54571944",...
0.6346218
0
Cancel any active waits or integrations in the subarray.
def cancel(subarray=DEFAULT) : multiSubarray('cancel', subarray)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cancel_all():\n\twhile _running:\n\t\t_running[0].cancel(noerror=True)", "def cancel(self):", "def cancel(self):", "def cancel(self):", "def cancel(self):\n self.waiter.set_result_if_pending([])\n \n timer = self.timer\n if (timer is not None):\n self.timer = None...
[ "0.68085307", "0.6652042", "0.6652042", "0.6652042", "0.66415197", "0.662577", "0.64824265", "0.64824265", "0.6418339", "0.6388133", "0.63711894", "0.6347805", "0.6329096", "0.62909824", "0.6242371", "0.6242371", "0.6168882", "0.61644095", "0.61326337", "0.6112848", "0.610890...
0.8134918
0
Run a target command such that it will respond to a keyboard interrupt. Target command must be cancellable meaning that it responds to the cancel() command. If it doesn't, this needs to be fixed on the C++ side.
def runKeyboardInterruptable(target, *args, **kwargs ): kit = KeyboardInterruptable.KeyboardInterruptable(targetcmd=target, cancelException=carma.util.CancelException, args=args, kwargs=kwargs ) try: kit.start() except Exception, ex: print 'Caught exception on d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def handleKeyboardInterupt():\n System.stopExecution(TERMINATED_BY_USER)", "async def keyboard_interrupt(self) -> None:\n self.logger.debug(\"Keyboard interrupt start\")\n print(\"Create task\")\n self.task = asyncio.create_task(self.target_coroutine)\n process_id = await self.get_pr...
[ "0.6137555", "0.58333373", "0.5799368", "0.5777304", "0.5767689", "0.57578194", "0.5633431", "0.5628528", "0.5606006", "0.5582524", "0.557939", "0.55637074", "0.55302805", "0.5523806", "0.54759127", "0.5467667", "0.5451235", "0.5354371", "0.5297462", "0.5270018", "0.5243123",...
0.7747106
0
This is a helper to send commands to multiple subarray controllers.
def multiSubarray(methodName, subarray, *args): def _execMethod(subarrayRef, methodName, args): "Helper method to actually execute a method on a single subarray" # The argument description is a list of lists containing the types of # all of the arguments for a given method, the return type...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def execute(self, devices, command_bytes):", "def send_command_to_all(self, comando, parametros=None):\n for usuario in self.clientes.copy():\n self.send_command(comando, usuario, parametros)", "def multi_command_start(self):\n\n log.debug(\n 'Starting multi-command message ...
[ "0.58995616", "0.55060875", "0.54569143", "0.54544187", "0.54406285", "0.54162306", "0.54101646", "0.53900594", "0.5387519", "0.53780055", "0.53265494", "0.5299899", "0.5298857", "0.52843004", "0.52783215", "0.525838", "0.52493984", "0.5241067", "0.5232815", "0.5227442", "0.5...
0.63566893
0
Turn on noise source, This also turns off the antenna RF amplifiers and will give a correlated signal of about 100%
def noiseon(delay=2.0, reference=False, subarray=DEFAULT) : multiSubarray('noiseSource', subarray, True, reference) multiSubarray('rfPower', subarray, False) sleep(delay) # Temporary - to allow for delay in correlator
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def noisePreset() :\n s.noisePreset()", "def set_noise_mode(self, mode):\n if mode == 0:\n self._diar_conf = (3, 1.5)\n else:\n self._diar_conf = (7, 1.4)", "def enable_noise_eater_mode(self, noise_eater_on):\n if noise_eater_on and self.locked():\n self...
[ "0.69289625", "0.6546143", "0.6540244", "0.6303954", "0.6122065", "0.6096989", "0.60278755", "0.5996174", "0.5962973", "0.5952684", "0.58529484", "0.5757229", "0.57152975", "0.5711458", "0.56797504", "0.567537", "0.5661267", "0.565396", "0.5612533", "0.55524325", "0.55389506"...
0.70983285
0
Set noise source power level to default value stored in EEPROM.
def noisePreset() : s.noisePreset()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enable_sensor_power():\n sen = digital.SensorPower(\"senpwr\") \n sen.set()", "def set_power(self, power):\n print('Setting santec power to %.4f mW' % power)\n self.santec1.write(\"LP %.2f\" % power)\n self.santec2.write(\"LP %.2f\" % power)\n self.santec3.write(\"LP %.2f\"...
[ "0.65613616", "0.64290893", "0.62240094", "0.61860675", "0.6021246", "0.601567", "0.59811854", "0.59661585", "0.5944273", "0.5809192", "0.57960945", "0.5755454", "0.57228214", "0.5676047", "0.56459695", "0.5638885", "0.55947906", "0.55756944", "0.5559737", "0.55540967", "0.55...
0.68354386
0
Turn on phase switching.
def pswitchon(chan) : s.phaseSwitching(True, chan)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def turn_on(self, **kwargs):\n self._state = True\n\n # Make initial update\n self.update_switch(self._initial_transition)\n\n self.schedule_update_ha_state()", "def turn_on(self, **kwargs):\n self.smartplug.turn_on()", "def turnOn(self):\n self.off = False\n se...
[ "0.6793064", "0.6698503", "0.6629485", "0.6605962", "0.64484453", "0.6447404", "0.64012665", "0.6358219", "0.6263478", "0.6257407", "0.6242577", "0.61970633", "0.619641", "0.61716014", "0.6151014", "0.6149689", "0.6095562", "0.6095158", "0.6083145", "0.6082343", "0.6059637", ...
0.73345774
0
Turn off phase switching.
def pswitchoff(chan) : s.phaseSwitching(False, chan)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def off_switch(self):\n self._switch_callback = None", "def turn_off(self, **kwargs):\n self.smartplug.turn_off()", "def lightning_turnoff(self):\n self.turnOff()", "def turn_off(self):\n self.robot.stop_simulation()", "def turnOff(self):\n self.off = True\n self.t...
[ "0.7479812", "0.74541664", "0.7239022", "0.7227539", "0.72216386", "0.71505696", "0.71325904", "0.7120933", "0.7108367", "0.70898795", "0.70524615", "0.7046064", "0.70034647", "0.7002755", "0.69903725", "0.6966109", "0.69656616", "0.69576687", "0.69566065", "0.6945246", "0.69...
0.7758828
0
Return number of antennas that are ready
def numReady(antReady) : return len(antReady.ready)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def numNotready(antReady) :\n return len(antReady.notready)", "def get_number_of_devices(self):\n return self.drt_manager.get_number_of_devices()", "def get_count():\n _check_init()\n return _pypm.CountDevices()", "def allready(antReady) :\n return numNotready(antReady) == 0", "def num_avail...
[ "0.8034309", "0.7039019", "0.6954414", "0.6732856", "0.6608728", "0.65878105", "0.6542558", "0.6526849", "0.6513246", "0.6506432", "0.64124936", "0.64124936", "0.64124936", "0.6349825", "0.6349679", "0.6326495", "0.6226333", "0.61683685", "0.6153766", "0.6128826", "0.6097696"...
0.83162636
0
Return number of antennas that are not ready
def numNotready(antReady) : return len(antReady.notready)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def numReady(antReady) :\n return len(antReady.ready)", "def get_number_of_devices(self):\n return self.drt_manager.get_number_of_devices()", "def allready(antReady) :\n return numNotready(antReady) == 0", "def get_count():\n _check_init()\n return _pypm.CountDevices()", "def get_etherscan_c...
[ "0.786196", "0.6797168", "0.6780413", "0.6611221", "0.6456291", "0.64308065", "0.64308065", "0.64308065", "0.64160544", "0.63447857", "0.63324404", "0.6290256", "0.6278517", "0.62608296", "0.62591696", "0.6194041", "0.61073685", "0.607193", "0.5964887", "0.59418595", "0.58996...
0.8263705
0
ReturnTrue if all antennas are ready
def allready(antReady) : return numNotready(antReady) == 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_all_systems_ready(self):\n self._check_all_sensors_ready()\n return True", "def _check_all_systems_ready(self):\n self._check_all_sensors_ready()\n return True", "def _check_all_sensors_ready(self):\n \n self._check_dist_ready()\n self._check_angle_re...
[ "0.7341485", "0.7341485", "0.7279284", "0.693834", "0.6883523", "0.67888576", "0.6755661", "0.67126304", "0.66896236", "0.66440654", "0.6598306", "0.6548975", "0.6530825", "0.6513315", "0.6513315", "0.65059745", "0.6497209", "0.64969766", "0.64969766", "0.64969766", "0.648813...
0.79890996
0
Waits for antennas to be acquired (default), then starts an integration and waits for it to complete. A cancel in another sac will break out of either wait.
def integrate(integTime=10, reps=6, ants=0, antwait=-2, tmo=500, gap=0.0, science=True, subarray=DEFAULT) : if type(reps) != int: m = "integrate(integTime, reps): reps must be an integer" commandlog(m) raise Exception, m if reps <= 0: m = "Infinite integration no...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wait_for_acquisition(self):\n self.lib.WaitForAcquisition()", "def start_acquisition(self):\n self.lib.StartAcquisition()", "def _start(self, acqtime):\n self.stopped = False\n NN = 1000\n while not self.stopped:\n self.prepare(acqtime, None, NN)\n f...
[ "0.56552005", "0.5649433", "0.53609854", "0.51836294", "0.5057187", "0.50487554", "0.5040647", "0.5004677", "0.4986236", "0.48653436", "0.48541954", "0.4852864", "0.4849983", "0.48491922", "0.48205808", "0.48057133", "0.47893575", "0.4749335", "0.47453985", "0.47404042", "0.4...
0.5672225
0
Move antennas to requested az/el and wait for all to acquire. All of the parameters have defaults, and it the az or el are not specified
def move(az=None, el=None, ants=0, tmo=500, waiton=ALL) : antlist = helpers.makeList(ants) if az == None and el == None : return if az == None : s.moveEl(el, antlist) elif el == None : s.moveAz(az, antlist) else : s.move(az, el, antlist) return wait(TRACK, antlist, tmo, waiton)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qmove(az=None, el=None, ants=0) :\n move(az, el, ants, waiton=NONE)", "def prepAntennaForMove( ants, az=None, el=None, shutdown=True ) :\n \n antlist = helpers.makeList(ants)\n\n thisSaNo = Subarray.getSubarrayNo()\n\n if thisSaNo <= 2:\n warning = \"So as not to interfere with running...
[ "0.6534189", "0.61675024", "0.5921047", "0.5896298", "0.5803404", "0.57796687", "0.576217", "0.5731381", "0.56996983", "0.5691499", "0.56824017", "0.5627269", "0.561877", "0.5607993", "0.5599607", "0.5592685", "0.55771506", "0.5570194", "0.5567435", "0.55593085", "0.5543259",...
0.71847934
0
Change the mount offset for a single antenna and wait for it to acquire. The azimuth offset is specified as an arc on the sky, not a coordinate offset. A cancel in another sac will break out of the wait. See also incmountoffset.
def mountoffset(az, el, ant, tmo=15, waiton=ALL, subarray=DEFAULT) : if subarray == BOTH: raise Exception, "Can't do mountoffset on BOTH subarrays" multiSubarray('mountOffset', subarray, az, el, ant) return wait(TRACK, ant, tmo, waiton, subarray=subarray)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setAzEncoderOffset(ant) :\n \n # Retrieve current azimuth offset (arcmin), elevation (degrees) \n # and az encoder pointing offset (implementation specific).\n\n azOffMpName = \"Control.Antenna%d.azimuthOffset\"%ant\n pointingConstants = pointingSetup( ant )\n\n if device.CarmaAnt().isOvro(a...
[ "0.5605048", "0.5557114", "0.546641", "0.520595", "0.51699036", "0.5101662", "0.50166696", "0.50136244", "0.49688193", "0.49611956", "0.4876603", "0.48357788", "0.48142007", "0.48112255", "0.4789889", "0.47800452", "0.47538948", "0.47423655", "0.47357845", "0.47324452", "0.46...
0.5759023
0
Set the mount offsets to zero and waits for acquisition.
def zeroMountOffsets(ants=0, tmo=15, subarray=DEFAULT) : if subarray == BOTH: raise Exception, "Can't do zeroMountOffset on BOTH subarrays" alist = helpers.makeList(ants) # Retains zero antlist = makeAntList(ants) for iant in antlist: multiSubarray('mountOffset', subarray, 0.0, 0.0, ian...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset(self):\n\t\tself.offsets = self.start_off.copy()", "def _RemountRootAsReadWrite(self):\n self.RunCmdOnDevice(['mount', '-o', 'remount,rw', '/'])", "def zero(self):\n\t\tself.angle = 0.0\n\t\tself.draw()\n\t\ttime.sleep(self.delay)", "def zero(self):\n daskD.wait(self.client.map(_call_zero...
[ "0.5875522", "0.56864446", "0.5681005", "0.56029284", "0.5404966", "0.53654873", "0.5342977", "0.5328655", "0.5322372", "0.53168917", "0.5304572", "0.5291085", "0.52467495", "0.5233463", "0.52308583", "0.5223287", "0.52203", "0.5219109", "0.52105486", "0.5166107", "0.5157914"...
0.61852044
0
This is a helper function for building the help (doc string) for both incoffset and incmountoffset.
def _incoffsetHelp(isMountoffset=False) : if isMountoffset: funcName = "mountoffset" else: funcName = "offset" h = \ """Increment the %ss, then apply to the nominal source position, and then wait for antennas to acquire. The az and el can be a list of incremental offsets; in t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shortHelpString(self):\n return self.tr(\"Algoritmo per il calcolo della rimozione degli inquinanti, nell'ambito del calcolo dei Servizi Ecosistemici per la Città di Torino\")", "def help_message() -> str:\n return \"/date <loc> - date in loc\\n\" +\\\n \"/directions <locA> <locB> - directio...
[ "0.6580957", "0.6128821", "0.5926002", "0.5905214", "0.57947284", "0.57520837", "0.56567067", "0.55878526", "0.55519336", "0.5538975", "0.54491365", "0.53887206", "0.53178126", "0.53136456", "0.5309811", "0.53086865", "0.5306093", "0.5302879", "0.5287555", "0.52855414", "0.52...
0.7903573
0
Get offsets for all 23 ants as a 23 element list of two element lists of az/el ofsets
def _getoffsets(isMountoffset): mplist = list() for i in range(23) : a = i+1 mp = device.Carma(a).getName() + ".AntennaCommon.Drive.Point." if (isMountoffset): mp += "mountOffset" else: mp += "offset" mpaz = mp + "Az" mpel = mp + "El" mps ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getoffsets():\n r = _getoffsets(isMountoffset=False)\n return r", "def getmountoffsets():\n r = _getoffsets(isMountoffset=True)\n return r", "def offsets(self):\n return [t[self.SPAN] for t in self.data]", "def offsets(self):\n return [t[self.SPAN] for t in self.data]", "def g...
[ "0.61480296", "0.6059593", "0.60580754", "0.60580754", "0.6008348", "0.5995833", "0.5922903", "0.58869636", "0.58109045", "0.5726303", "0.5718592", "0.57149464", "0.57073414", "0.57047546", "0.5700806", "0.5682464", "0.5577446", "0.5544435", "0.5509225", "0.55089855", "0.5481...
0.6483532
0
Get offsets for all 23 ants as a 23 element list of two element lists of az/el ofsets. A value of None is returned for invalid MPs
def getmountoffsets(): r = _getoffsets(isMountoffset=True) return r
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _getoffsets(isMountoffset):\n mplist = list()\n for i in range(23) :\n a = i+1\n mp = device.Carma(a).getName() + \".AntennaCommon.Drive.Point.\"\n if (isMountoffset): mp += \"mountOffset\"\n else: mp += \"offset\"\n mpaz = mp + \"Az\"\n mpel = m...
[ "0.72874445", "0.6384358", "0.61379236", "0.5975133", "0.59123254", "0.58174837", "0.5736684", "0.567577", "0.5669115", "0.5613459", "0.5613459", "0.5586894", "0.55131304", "0.5464672", "0.54064256", "0.5362923", "0.53477424", "0.53120136", "0.52579415", "0.52164626", "0.5214...
0.662332
1
Set the safe azimuth and elevation ranges over which an antenna cannot collide with a neighboring antenna (in closepacked array configurations).
def setSafeRange( azLow, azHigh, elLow, elHigh, ants, subarray=DEFAULT) : antlist = helpers.makeList(ants) multiSubarray('setSafeRange', subarray, azLow, azHigh, elLow, elHigh, antlist)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_limits(self):\n\n #Find the relative position of each leg vs. its \"zero\" position\n relpos = self.fixed_plate - self.fixed_plate_zero\n\n for leg in range(3):\n #Check that the leg is within allowable \"safe zone\"\n #Use the position of the leg (relative to 0...
[ "0.56387204", "0.5621987", "0.5555418", "0.54067415", "0.53795385", "0.53312033", "0.53200245", "0.52538556", "0.52425647", "0.52309364", "0.51850075", "0.5132379", "0.5102437", "0.5058169", "0.50323546", "0.5031172", "0.5028666", "0.5018337", "0.50181246", "0.50171715", "0.4...
0.628929
0
Add another primry flux calibrator observation to the observing script
def addFluxcal(): # Overall i = s.getScriptInt(odi.INDX_INT_NOBS_FLUX) - 1 if i < 0: i = 0 s.setScriptInt(odi.INDX_INT_NOBS_FLUX, i) # Primary i = s.getScriptInt(odi.INDX_INT_NOBS_FLUXPRI) - 1 if i < 0: i = 0 s.setScriptInt(odi.INDX_INT_NOBS_FLUXPRI, i)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_observation(self):", "def create_observation(self):", "def addFluxObjective(self, *args):\n return _libsbml.Objective_addFluxObjective(self, *args)", "def addFluxObjective(self, *args):\n return _libsbml.ListOfFluxObjectives_addFluxObjective(self, *args)", "def add_mf_updates(self)...
[ "0.5502878", "0.5502878", "0.54787785", "0.5370386", "0.5350235", "0.5291626", "0.52440214", "0.5110795", "0.5102887", "0.50705427", "0.5068422", "0.50554484", "0.5054473", "0.5027376", "0.5025392", "0.499283", "0.499283", "0.4990393", "0.49895605", "0.49793413", "0.4972355",...
0.6044833
0
Set the tracking threshold for optical pointing for a single or group of antennas. The tracking threshold is the sky tracking error in arcseconds that is used to determine if the antenna state is TRACK
def trackThresholdOptical(threshold, ants=0) : SPEED_OF_LIGHT = 299792458.0 # m/s antlist = helpers.makeList(ants) if antlist[0] == 0: antlist = currentAntennaNumbers() flo = lofreq() t = 0 for ant in antlist: antmp = "control.antenna%d" %ant d = queryDouble(antmp + ".diameter") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def toggle_tracking(self, tracking=None):\n \n if tracking is None:\n self.tracking = not self.tracking\n else:\n self.tracking = tracking\n if self.tracking:\n log.info(\"ACTIVATE TRACKING\")\n\n\n # Start an explarotary 360\n #sel...
[ "0.5807156", "0.5546692", "0.5419536", "0.54121786", "0.53216475", "0.52426696", "0.52426696", "0.52426696", "0.52426696", "0.52426696", "0.5191178", "0.51785773", "0.5134639", "0.5105937", "0.5071912", "0.5066054", "0.5063127", "0.50618255", "0.50553536", "0.5051671", "0.500...
0.61478543
0
Apply new baseline solutions from input antpos file to the system. The new solutions will be remembered by the system via the state restoration subsystem.
def baselineSolutions(filename): def getOtherSaCurrentAnts( ): """ Retrieve ants in other science subarrays. """ if subarrayNo == 1: otherSa = Subarray.getSubarrayRef( 2 ) otherSaAntAssignments = otherSa.getAntennaAssignments( ) elif subarrayNo == 2: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main():\n\n # Create argument parser\n parser = ArgumentParser()\n parser.add_argument('datadir', type=str, help='Directory of LC files')\n parser.add_argument('metatable', type=str,\n help='Metatable containing each object, redshift, peak time guess, mwebv, object type')\n ...
[ "0.5461683", "0.53891504", "0.51151294", "0.50806624", "0.50806624", "0.50806624", "0.5071328", "0.50614345", "0.5040519", "0.5030909", "0.50266016", "0.5025759", "0.5007345", "0.4976536", "0.49383202", "0.49333775", "0.49312133", "0.49223614", "0.49221155", "0.49221155", "0....
0.6137906
0
Retrieve ants in other science subarrays.
def getOtherSaCurrentAnts( ): if subarrayNo == 1: otherSa = Subarray.getSubarrayRef( 2 ) otherSaAntAssignments = otherSa.getAntennaAssignments( ) elif subarrayNo == 2: otherSa = Subarray.getSubarrayRef( 1 ) otherSaAntAssignments = otherSa.getAntennaAssignm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def array2(self):\n print \"array2\"\n msgbox(whoami())\n #research\n inputLabelID = self.__needleLabelSelector.currentNode().GetID()\n labelnode=slicer.mrmlScene.GetNodeByID(inputLabelID)\n i = labelnode.GetImageData()\n shape = list(i.GetDimensions())\n shape.reverse()\n a = vtk.util.n...
[ "0.5554594", "0.53668493", "0.53497106", "0.5331561", "0.5319332", "0.53165925", "0.5305885", "0.52696294", "0.52142704", "0.5203574", "0.519352", "0.5161498", "0.51533383", "0.510889", "0.50813174", "0.5071149", "0.5013468", "0.5004938", "0.5004938", "0.49951166", "0.4988286...
0.6795726
0
Set pointing constants for the optical aperture. These sit directly on top of the mount model.
def opticalPointingConstants( az, el, sag, ant, subarray=DEFAULT): OPTICAL = carma.control.APERTURE_OPTICAL multiSubarray('aperturePointingConstants', subarray, OPTICAL, az, el, sag, ant)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setAzEncoderOffset(ant) :\n \n # Retrieve current azimuth offset (arcmin), elevation (degrees) \n # and az encoder pointing offset (implementation specific).\n\n azOffMpName = \"Control.Antenna%d.azimuthOffset\"%ant\n pointingConstants = pointingSetup( ant )\n\n if device.CarmaAnt().isOvro(a...
[ "0.5511548", "0.5490807", "0.54544395", "0.5420159", "0.541535", "0.5404716", "0.53925854", "0.53554964", "0.5340483", "0.53276527", "0.5279992", "0.5260545", "0.52529174", "0.5209229", "0.5176619", "0.5175321", "0.5142787", "0.51321983", "0.5109723", "0.5109723", "0.5079024"...
0.57001173
0
Set pointing constants for the 1mm radio aperture. This sets the constants in the antennas as absolute corrections. Note that these constants will be changed whenever the 3mm constants change as the 1mm constants are assumed to be dependent on the 3mm. If this is not the case, for example if a 3mm receiver is changed o...
def radio1mmPointingConstants(az, el, sag, ant, subarray=DEFAULT): R1MM = carma.control.APERTURE_RADIO1MM s.aperturePointingConstants(R1MM, az, el, sag, ant)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list1mmPointing() :\n p1mm = _radioPointingSetup(RX1MM, range(1,16))\n # output commands for the current 1 mm constants\n for i in range(1,16):\n print \"radio1mmPointingConstants(%6.2f, %5.2f, %5.2f, %2i)\" \\\n %(p1mm[i-1][0], p1mm[i-1][1], p1mm[i-1][2], i)", "def radio3mmPoi...
[ "0.6024976", "0.59981567", "0.59888333", "0.58412033", "0.5648622", "0.5543881", "0.5518445", "0.5356374", "0.52640927", "0.52029574", "0.51900893", "0.5184684", "0.5161967", "0.515954", "0.5149055", "0.51420254", "0.5089032", "0.5084223", "0.50819445", "0.50542015", "0.50044...
0.6318657
0
Set pointing constants for the 3mm radio aperture. This also adjusts the 1mm aperture constants which are relative to this 3mm aperture, by the difference from the previous 3mm radio aperture terms. When establishing the state of a new system, where the previous values may not be valid, restore the 1mm constants after ...
def radio3mmPointingConstants( az, el, sag, ant, subarray=DEFAULT): mproot = "Control.Antenna%d.Aperture3mm.PointingConstants." %ant azValid = False elValid = False sagValid = False numInvalid = 0 try : azDelta = az - queryDouble(mproot+"azOffset") azValid = True e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list3mmPointing() :\n p3mm = _radioPointingSetup(RX3MM, range(1,24))\n # output commands for the current 3 mm constants\n for i in range(1,24):\n print \"radio3mmPointingConstants(%6.2f, %5.2f, %5.2f, %2i)\" \\\n %(p3mm[i-1][0], p3mm[i-1][1], p3mm[i-1][2], i)", "def _radioPoint...
[ "0.58173245", "0.5758549", "0.5518568", "0.54716474", "0.5337424", "0.5318897", "0.52463704", "0.5237664", "0.52080494", "0.5148435", "0.5123312", "0.5068535", "0.49918455", "0.4956765", "0.49271506", "0.49120915", "0.48657662", "0.4857624", "0.48499846", "0.48364818", "0.483...
0.7143384
0
Set encoder limits for 3.5m dishes.
def szaEncoderLimits( azMinEncoderCount, azMaxEncoderCount, elMinEncoderCount, elMaxEncoderCount, ant, subarray=DEFAULT ) : multiSubarray('setSzaEncoderLimits', subarray, azMinEncoderCount, azMaxEncoderCount, elMinEncoderCount, elM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_limits_minmax(self, zmin, zmax):\n self.pixels.set_clim(zmin, zmax)\n self.autoscale = False", "def set_limits_minmax(self, zmin, zmax):\n self.camera.set_clim(zmin, zmax)\n self.autoscale = False", "def SetNarrowBandwidth(self, value: 'double') -> \"void\":\n return ...
[ "0.57426995", "0.56342304", "0.56261945", "0.5611381", "0.55244976", "0.5523891", "0.54731977", "0.5361097", "0.5349961", "0.5349373", "0.53493345", "0.5340115", "0.5306149", "0.52794737", "0.5256034", "0.52516097", "0.52445334", "0.52445334", "0.51795024", "0.5167963", "0.51...
0.63325757
0
Set encoder zeros for 3.5m dishes.
def szaEncoderZeros( azEncoderZeroDegrees, elEncoderZeroDegrees, ant, subarray=DEFAULT ) : multiSubarray('setSzaEncoderZeros', subarray, azEncoderZeroDegrees, elEncoderZeroDegrees, ant )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_dacs_zero(self):\n # First set all \"parameters\" to zero.\n # this ensures that the safe slow rampdown is used and that the\n # correct values are known to the instrument.\n for ch in self.channel_map:\n self.set(ch, 0)\n\n # \"brute-set\" all sources in known...
[ "0.59934497", "0.58063924", "0.5748194", "0.5720304", "0.55948925", "0.5581794", "0.54511774", "0.544228", "0.54174435", "0.5363331", "0.5342411", "0.53155875", "0.5311926", "0.53109956", "0.52898747", "0.5276403", "0.52598673", "0.5220831", "0.5209284", "0.5203194", "0.52021...
0.60015386
0
Take the current pointing offset and convert it into an encoder offset in the system. The encoder offset in the mount pointing model is modified based on the current elevation and the azimuth offset value set by the 'offset' command. The offset is then set to zero.
def setAzEncoderOffset(ant) : # Retrieve current azimuth offset (arcmin), elevation (degrees) # and az encoder pointing offset (implementation specific). azOffMpName = "Control.Antenna%d.azimuthOffset"%ant pointingConstants = pointingSetup( ant ) if device.CarmaAnt().isOvro(ant): ac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __calculateOffset(self):\n #if len(self.__XValue) > 0:\n # print(\"GPSBearing: \"+str(round(self.__GPSBearing[-1]))+\", heading: \"+str(round(self.value))+\n # \", x: \"+str(round(self.__XValue[-1]))+\", stdev: \"+str(round(np.std(self.__GPSBearing),5))+\n # \",...
[ "0.6021983", "0.56835026", "0.56317544", "0.5594085", "0.552948", "0.54975945", "0.5369681", "0.5358131", "0.5345141", "0.53266644", "0.5307107", "0.530702", "0.530228", "0.5287115", "0.5286362", "0.52612835", "0.5250199", "0.52184606", "0.5170859", "0.5168617", "0.5141241", ...
0.6821554
0
Initiate an iv curve on a set of antennas and wait for completion.
def doIVcurve(rx, pol=carma.antenna.common.RxControl.LEFTCIRCULAR, ants=0, tmo=0, waiton=ALL) : antlist = helpers.makeList(ants) s.doIVcurve(rx, pol, antlist) return wait(TUNED, tmo, waiton)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sweep():\n \n set_enable_load(True) # turn input ON\n time.sleep(.250)\n \n print('Begin IV curve measurement')\n \n voc = open_circ() # measure open circuit voltage\n iv_curve(voc) # measure iv curve\n short_circ() # measure short circuit current\n \n time.sleep(.250)\n set...
[ "0.6044447", "0.5624219", "0.552139", "0.5369829", "0.5288038", "0.51521116", "0.51179934", "0.51165533", "0.51020867", "0.50454754", "0.5029908", "0.5027265", "0.5021735", "0.5021162", "0.49465597", "0.4918269", "0.49089974", "0.48980674", "0.4897412", "0.48775667", "0.48585...
0.66098267
0
Set polarization state on a set of antennas and wait for completion.
def polarization(state, ants=0, tmo=60, waiton=ALL) : antlist = helpers.makeList(ants) s.polarization(state, antlist) return wait(OPTICS, tmo, waiton)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def antenna_set(self):", "def wait(self):\n self.set_vals(spin=.2)\n nearest_deg = 0\n nearest_deg_dist = self.perim_dist + 1\n for i, x in enumerate(self.ranges):\n if (x != 0) and (x < nearest_deg_dist):\n nearest_deg = i\n nearest_deg_dist = x\n if nearest_deg_dist < self.per...
[ "0.5700076", "0.55220395", "0.5324009", "0.5300594", "0.5168078", "0.50962996", "0.5079822", "0.50131404", "0.49951383", "0.49763736", "0.49677816", "0.49470165", "0.4942994", "0.4907468", "0.4903556", "0.48725915", "0.48672417", "0.4847562", "0.48471665", "0.48374152", "0.48...
0.70240057
0
Get current value of monitor point. If not valid, go into a loop sleeping 0.6sec and retrying until the retry count is reached. If data are still not valid then an exception is thrown.
def queryInt(monitorPoint, retries=1) : trials = retries + 1 for i in range(trials) : try: return s.queryInt(monitorPoint) except carma.control.InvalidMonitorDataException: if i < retries: sleep(0.6) except carma.control.MonitorPointNotFoundExcepti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def queryDouble(monitorPoint, retries=1) :\n trials = retries + 1\n for i in range(trials) :\n try:\n return s.queryDouble(monitorPoint)\n except carma.control.InvalidMonitorDataException:\n if i < retries:\n sleep(0.6)\n except carma.control.MonitorP...
[ "0.6312425", "0.6057201", "0.6000599", "0.57748723", "0.5619404", "0.56186604", "0.55322456", "0.5518411", "0.548146", "0.5477293", "0.5445614", "0.5406626", "0.53729665", "0.53725123", "0.5345371", "0.53077096", "0.529674", "0.5251814", "0.52290833", "0.52170974", "0.5197693...
0.62334335
1
Get current value of monitor point. If not valid, go into a loop sleeping 0.6sec and retrying until the retry count is reached. If data is still not valid then an exception is thrown
def queryDouble(monitorPoint, retries=1) : trials = retries + 1 for i in range(trials) : try: return s.queryDouble(monitorPoint) except carma.control.InvalidMonitorDataException: if i < retries: sleep(0.6) except carma.control.MonitorPointNotFoundE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def queryInt(monitorPoint, retries=1) :\n trials = retries + 1\n for i in range(trials) :\n try:\n return s.queryInt(monitorPoint)\n except carma.control.InvalidMonitorDataException:\n if i < retries:\n sleep(0.6)\n except carma.control.MonitorPointNo...
[ "0.62650096", "0.59751654", "0.59690326", "0.5829236", "0.55716515", "0.55530155", "0.5552924", "0.5496119", "0.54659295", "0.545739", "0.54294187", "0.5415038", "0.5409318", "0.53856176", "0.5352021", "0.53366196", "0.53113115", "0.5305114", "0.5255219", "0.5229987", "0.5226...
0.631405
0
Set the value of a control subsystem monitor point. The monitor point must be either a double of a float. Useful for fixing broken system state (invalid monitor point).
def setMonitorPointReal(name, value): c1 = name.split(".")[0].lower() if c1 == "carma": name =name[6:] c1 = name.split(".")[0].lower() if c1 == "control": name =name[8:] #print name s.setMonitorPointReal(name, value)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_setpoint(self, value):\n value = value * self.conf['PSICONV']\n log.debug(\"Set pressure regulator %d to %f\", self.id_, value)\n self.synth.cbox.set_dac(self.id_, value)", "def set_setpoint(self, value):\n self.voltageSetpoint = value/self.gain\n self.widgets['p_setpoi...
[ "0.67051196", "0.63923126", "0.61883557", "0.60618323", "0.6050793", "0.6037822", "0.58822596", "0.5865629", "0.58379513", "0.57407707", "0.5700103", "0.5696344", "0.5665593", "0.56449944", "0.5619435", "0.5600346", "0.55799824", "0.552513", "0.55077416", "0.5499122", "0.5488...
0.68894213
0
Set a control subsystem monitor point as invalid. This is for debugging and testing.
def setMonitorPointInvalid(name): c1 = name.split(".")[0].lower() if c1 == "carma": name =name[6:] c1 = name.split(".")[0].lower() if c1 == "control": name =name[8:] #print name s.setMonitorPointInvalid(name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_invalidated(self):\n # GTK Settings for evogtk\n self.set_property('image',self.__errorimg)", "def set_sensors_invalid(self):\n\n for sensor_name in self.sensors.keys():\n self.sensors[sensor_name].valid = False", "def invalid(self):\n pass", "def invalidate(sel...
[ "0.62992316", "0.5798106", "0.56208324", "0.56168616", "0.55043405", "0.54681206", "0.53816706", "0.53705335", "0.5366669", "0.5366669", "0.53225106", "0.5232545", "0.52245665", "0.5203126", "0.5193205", "0.5183373", "0.5177706", "0.5177706", "0.51721716", "0.51563704", "0.51...
0.6634206
0
Query the flux catalog for a calibrator flux measurement. source The source name, case insensitive. freq The frequency in GHz, zero means any frequency. deltafreq The halfwidth frequency range about 'freq' to consider as a match in the query. This parameter is ignored if freq = 0. daysback Time limit of how far back to...
def queryFlux(source, freq=0.0, deltafreq=0.0, daysback=0.0) : return s.queryFlux(source, freq, deltafreq, daysback)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def flux(source, freq=0.0, deltafreq=0.0, daysback=0.0) :\n x = queryFlux(source,freq,deltafreq,daysback)\n return x.flux", "def flux(self, x):\n return self.cal_spec.get_flux(self(x))", "def get_frequency(self, **kwargs):\n #self.resource.clear()\n channel = kwargs.get(\"channel\", ...
[ "0.7538839", "0.52508557", "0.4671229", "0.4669591", "0.4627728", "0.45151344", "0.45020443", "0.448794", "0.4467002", "0.44551203", "0.44197336", "0.44131923", "0.43878692", "0.4386568", "0.433849", "0.43227318", "0.43170792", "0.4277224", "0.42687237", "0.4258013", "0.42474...
0.77732354
0
Get the current values of the delay offset for all antennas and display them in the form of the commands to enter the delay.
def queryDelay(ants=0) : antlist=makeAntList(ants) print "Current delays" for a in antlist : mp = "Control.Antenna%d.delayOffset3mmRx" %a try : print "delay(%7.3f, %2d)" %(queryDouble(mp, retries=0), a) except Exception: print "C%d" %a, "does not have a va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def print_delay(self):\n if not self.delays:\n return\n ret = self.get_delay()\n if ret is None:\n print('no new messages')\n return\n delay, min_delta, max_delta, std_dev, window = ret\n # convert nanoseconds to seconds when print\n print(...
[ "0.5954282", "0.57806796", "0.5708593", "0.55927527", "0.5575941", "0.55152696", "0.5394419", "0.53919154", "0.53644294", "0.53452814", "0.5342607", "0.53298455", "0.53259796", "0.52444094", "0.52094525", "0.5191085", "0.5159378", "0.51555735", "0.51397234", "0.5136353", "0.5...
0.6606975
0
Query the flux catalog for a calibrator flux measurement. source The source name, case insensitive. freq The frequency in GHz, zero means any frequency. deltaFreq The halfwidth frequency range about 'freq' to consider as a match in the query. This parameter is ignored if freq = 0. daysback Time limit of how far back to...
def flux(source, freq=0.0, deltafreq=0.0, daysback=0.0) : x = queryFlux(source,freq,deltafreq,daysback) return x.flux
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def queryFlux(source, freq=0.0, deltafreq=0.0, daysback=0.0) :\n return s.queryFlux(source, freq, deltafreq, daysback)", "def flux(self, x):\n return self.cal_spec.get_flux(self(x))", "def stSpectralFlux(X, Xprev):\n # compute the spectral flux as the sum of square distances:\n sumX = numpy.sum...
[ "0.77129394", "0.56761026", "0.5083384", "0.47679162", "0.47086465", "0.46536472", "0.45953226", "0.4546218", "0.4537561", "0.4525276", "0.45226136", "0.44777504", "0.44653535", "0.44610018", "0.44304115", "0.44008535", "0.43952003", "0.43901777", "0.43801594", "0.43755198", ...
0.7708133
1
Return a list of values (or list of list of values) for the input canonical names. Recursive lists are allowed in which the output structure duplicates the input structure of the canonicalNames argument with the caveat that a list must contain either other lists or names but not both. So for example [ ['mp11', 'mp12'],...
def queryMpValues( canonicalNames, nothrow=False ): from subarrayCommands import queryMonitorPoint def querySingleListOfMpValues( canonicalNameList, nothrow ): mps = queryMonitorPoint( canonicalNameList ) mpValues = [] for m in mps: if m.isValid(): mpValues.ap...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_valid(self, names):\n\n ret = [None] * len(names)\n posdict = dict([(name, i) for i, name in enumerate(names)])\n\n for compname, varnames in partition_names_by_comp(names).items():\n if compname is None:\n vals = super(Assembly, self).get_valid(varnames)\n ...
[ "0.52857715", "0.51956606", "0.49204636", "0.48756886", "0.48440224", "0.48370436", "0.483333", "0.48273328", "0.48112097", "0.47469178", "0.47103402", "0.4693334", "0.463706", "0.45999786", "0.45910898", "0.45612848", "0.45207393", "0.45089003", "0.44985938", "0.44956458", "...
0.71766347
0
Search for the brightest sources that are currently up, filtering by various criteria and sorted by brightness. This is useful for, e.g., finding nearby calibrators, optical/radio pointing sources.
def getBrightest(source=None, elMin=20, elMax=87, sourceList=[], action=INCLUDE, numReturn=1, ignoreNorthSouth=True, coordsys="azel", getOptical=False, fluxLimit=1.0, frequency=95) : # If source is None then use Polaris as the source as it is always up nsource = source ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_sources(image):\n from scipy import ndimage\n from astropy.stats import mad_std\n\n img1 = image.copy().astype('float32')\n m, s = np.median(image), mad_std(image)\n src_mask = image > m + 3.0 * s\n # set the background to the min value of the sources\n img1[~src_mask] = img1[src_mask...
[ "0.647149", "0.5660055", "0.5602892", "0.55622953", "0.54628134", "0.5355189", "0.5299457", "0.5208573", "0.516642", "0.51436144", "0.5137898", "0.51197386", "0.5110136", "0.5109966", "0.50582457", "0.5053554", "0.5044763", "0.5041263", "0.5029797", "0.50197864", "0.5014616",...
0.6398509
1
Remove an antenna or list of antennas from this subarray and put them into the maintenance subarray. Zero removes all antennas that are currently in this subarray..
def removeAntenna(ants, ignoreOwnership=True, subarray=DEFAULT) : results = multiSubarray('removeAntenna', subarray, helpers.makeList(ants), ignoreOwnership) if not ignoreOwnership : return alreadyRemoved = results.alreadyInMaint inOtherSubarrays = results.ownedByOtherSubarrays if le...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addAntenna(ants, ignoreOwnership=True, retune=True, waiton=ALL, tsys=True,\n restore=True, dbg=False, subarray=DEFAULT):\n\n def setInitialized( initialized, ants, subarray=DEFAULT ):\n \"\"\"Local helper routine to set antenna initialized flags. This is\n function local because...
[ "0.5715771", "0.5538183", "0.54846156", "0.5484113", "0.54674613", "0.5377061", "0.5353932", "0.5350521", "0.5338536", "0.530831", "0.53014946", "0.5287292", "0.528204", "0.523585", "0.52335894", "0.5225503", "0.51740146", "0.51697826", "0.5163876", "0.5132826", "0.51298946",...
0.6700437
0
Add an antenna or list of antennas to this subarray. The antenna(s) to be added must be in the Offline subarray. The state of the antenna is restored when it is added to the subarray, including frequency and tracking. Note that addAntenna cannot do a linelength initialization because it will change the 1st LO. See the ...
def addAntenna(ants, ignoreOwnership=True, retune=True, waiton=ALL, tsys=True, restore=True, dbg=False, subarray=DEFAULT): def setInitialized( initialized, ants, subarray=DEFAULT ): """Local helper routine to set antenna initialized flags. This is function local because we don't wan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def antenna(self, antenna):\n\n self._antenna = antenna", "def antenna_set(self):", "def agregar_al_atril(self):\n self.atril.append(self.bolsa.tomar_bolsa())", "def add(\n self,\n Enabled=None,\n InternalRootPathCost=None,\n Mac=None,\n PortPriority=None,\n ...
[ "0.5779184", "0.52397346", "0.5176424", "0.51680714", "0.50252247", "0.49938044", "0.49795538", "0.49758184", "0.49210852", "0.48916703", "0.48783037", "0.48421955", "0.48105335", "0.47829047", "0.47537357", "0.471806", "0.47096792", "0.47080392", "0.46797553", "0.46475562", ...
0.67017454
0
For antennas that are unowned and uninitialized, set their locations so that the MIRIAD file gets all antenna locations regardless of initialization state or subarray ownership. If the subarray is already initialized, this command will return immediately (a noop).
def restorePositionsOfUnownedAntennas() : if ( s.getInitializationFlag() == True ): return unownedAnts = subarrayAntSetup( True ) progress("Setting positions of unowned and uninitialized antennas %s" % helpers.formatAsRanges( unownedAnts) ) progress("....Pads") restoreAntCommand(pad, unownedAnts, su...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setInitialized( initialized, ants, subarray=DEFAULT ):\n antlist = helpers.makeList(ants)\n multiSubarray('antennaInitialized', subarray, initialized, antlist )", "def addAntenna(ants, ignoreOwnership=True, retune=True, waiton=ALL, tsys=True,\n restore=True, dbg=False, subarray=DE...
[ "0.706658", "0.6766113", "0.6476574", "0.61194855", "0.5748", "0.55818874", "0.5544687", "0.55443925", "0.54471445", "0.52569807", "0.5249574", "0.51693755", "0.51589984", "0.5111438", "0.50705", "0.5062975", "0.505136", "0.4976659", "0.4975087", "0.4964495", "0.49114415", ...
0.71153253
0
Return a list of carma antenna numbers that are members of this subarray. If BOTH is requested as the subarray then the list of antennas in both SCI1 and SCI2 subarrays is returned.
def currentAntennaNumbers(subarray=DEFAULT) : def _helper(a): antnums = [] for i in a: num = i.carmaAntennaNo antnums.append(num) return antnums if type(subarray) != str: m = "The subarray input to currentAntennaNumbers(" + str(subarray) m += ") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getOtherSaCurrentAnts( ):\n if subarrayNo == 1:\n otherSa = Subarray.getSubarrayRef( 2 )\n otherSaAntAssignments = otherSa.getAntennaAssignments( )\n elif subarrayNo == 2:\n otherSa = Subarray.getSubarrayRef( 1 )\n otherSaAntAssignments = otherSa.getAnt...
[ "0.68179727", "0.6113501", "0.5518897", "0.5403804", "0.5213788", "0.51503104", "0.5007903", "0.4992396", "0.49897334", "0.4964752", "0.49266085", "0.49016094", "0.49010935", "0.4887049", "0.48624244", "0.4849829", "0.48462182", "0.48446175", "0.4828843", "0.48142296", "0.480...
0.6424829
1
Return a list of strings describing the antenna composition of this subarray, using the typed antenna names (e.g. ovroN, bimaN)
def typedAntennaNames() : a=s.getAntennaAssignments() namelist = [] for i in a: namelist.append( i.typedAntennaName ) return namelist
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def currentAntennaNames(carmaOnly=False) :\n a=s.getAntennaAssignments()\n namelist = []\n for i in a:\n cname = i.carmaAntennaName\n tname = i.typedAntennaName\n if (carmaOnly) :\n names = i.carmaAntennaName\n else :\n names = \"%s(%s)\" %(cname,tname)\n ...
[ "0.6157085", "0.58831984", "0.58799595", "0.5583862", "0.5582066", "0.5534846", "0.5479421", "0.5477433", "0.54766923", "0.5454577", "0.5451176", "0.5440432", "0.54252684", "0.5395758", "0.53727156", "0.5370918", "0.5366097", "0.5356559", "0.5344231", "0.53086424", "0.5307318...
0.6653162
0
Returns a list with three lists, each containing the antenna numbers for each antenna type, ordered by ovro, bima, sza
def antennasByType(ants=0) : ovroAnts = [] bimaAnts = [] szaAnts = [] antlist = makeAntList(ants) for a in antlist : if device.CarmaAnt().isOvro(a) : ovroAnts.append(a) elif device.CarmaAnt().isBima(a) : bimaAnts.append(a) elif device.CarmaAnt().isSza(a) : szaAnts.append(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getAminos(self):\n\t\treturn self.aminos", "def get_atypes(self):\n self.atypes = []\n self.hybs = []\n #self.zs = []\n for ai in self.m.GetAtoms():\n hybi = str( ai.GetHybridization() )\n self.hybs.append( hybi )\n zi = ai.GetAtomicNum()\n ...
[ "0.5752523", "0.5735328", "0.5538445", "0.54339767", "0.5427485", "0.5417534", "0.54066795", "0.5366798", "0.5349118", "0.5334744", "0.5310195", "0.53074944", "0.52924144", "0.5240033", "0.52211106", "0.51725733", "0.5144109", "0.51391333", "0.50681436", "0.50614554", "0.5048...
0.7169323
0
Set all delay usage booleans to their default values for all antennas in this subarray. These booleans turn on or off different parts of the
def delayDefaults(ants=[0], subarray=DEFAULT) : multiSubarray('useAdjustableDelay', subarray, True,ants) multiSubarray('useGeometricDelay', subarray, True,ants) multiSubarray('useHeightDelay', subarray, True,ants) multiSubarray('useIonosphericDelay', subarray, False,ants) multiSubarray('useThermalDe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delaysOff() :\n s.useAdjustableDelay(False,[0])\n s.useGeometricDelay(False,[0])\n s.useHeightDelay(False,[0])\n s.useIonosphericDelay(False,[0])\n s.useThermalDelay(False,[0])\n s.useTroposphericDelay(False,[0])\n adjustableDelay(0,0)\n ants = currentAntennaNumbers()\n for myAnt in ...
[ "0.6902625", "0.60518354", "0.58849823", "0.5839578", "0.5683107", "0.5671098", "0.5655112", "0.5645115", "0.5563421", "0.54911447", "0.54490703", "0.54094315", "0.5404638", "0.5355792", "0.5331481", "0.5331481", "0.5315023", "0.5312984", "0.52990514", "0.52946585", "0.528955...
0.71620077
0
Set all delay usage booleans to False and delay offsets to zero. FOR TESTING ONLY .
def delaysOff() : s.useAdjustableDelay(False,[0]) s.useGeometricDelay(False,[0]) s.useHeightDelay(False,[0]) s.useIonosphericDelay(False,[0]) s.useThermalDelay(False,[0]) s.useTroposphericDelay(False,[0]) adjustableDelay(0,0) ants = currentAntennaNumbers() for myAnt in ants : ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delayDefaults(ants=[0], subarray=DEFAULT) :\n multiSubarray('useAdjustableDelay', subarray, True,ants)\n multiSubarray('useGeometricDelay', subarray, True,ants)\n multiSubarray('useHeightDelay', subarray, True,ants)\n multiSubarray('useIonosphericDelay', subarray, False,ants)\n multiSubarray('us...
[ "0.6685882", "0.6439071", "0.6439071", "0.62004495", "0.6131575", "0.59857816", "0.59299016", "0.59025776", "0.5864747", "0.58373505", "0.5834058", "0.58303195", "0.581881", "0.5796711", "0.57480633", "0.56912965", "0.5671799", "0.5665981", "0.56347793", "0.5626634", "0.56040...
0.72873783
0
Set delay offsets for an antenna for 3mm POL1 receiver signal path.
def delay(delay, ant, subarray=DEFAULT) : if ant < 1 or ant > 23: raise Exception, "Antenna number(%d) must be in range [1-23]" %ant mp = "Control.Antenna%d.delayOffset3mmRx" %ant try : oldDelay = queryDouble(mp, retries=0) if False: print "Previous value of delay for antenna %d was ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def adjustableDelay(delay, ants) :\n antlist = helpers.makeList(ants)\n s.adjustableDelay(delay, antlist)", "def smart_T1_delays(T1_int=90e3, QPT1=1.5e6, half_decay_point=1e6, eff_T1_delay=800.0, probe_point=0.5, meas_per_QPinj=30, meas_per_reptime=5):\r\n# rep_time = 1.0e9/fg.get_frequency()\r\n# T1...
[ "0.58988255", "0.56231785", "0.54369324", "0.53831506", "0.53437513", "0.53215", "0.5270873", "0.5262336", "0.52379465", "0.52244276", "0.51110995", "0.50847864", "0.5054301", "0.4992385", "0.4955606", "0.49421886", "0.49287808", "0.49202627", "0.48722968", "0.48170522", "0.4...
0.58245337
1
Set delay difference between 1mm/1cm and 3mm POL1 receiver signal path, for each polarization. The difference is 1mm/1cm path minus 3mm POL1 path.
def delaydiff(delay, ant, rx=RX1MM, pol=POL1, subarray=DEFAULT) : if ( pol == POL1 ) : if ( rx == RX3MM ) : raise Exception, "The delay difference for 3mm Rx Pol1 is zero by definition." elif ( rx == RX1MM ) : mp = "Control.Antenna%d.rxDelay1mmPol1"%ant elif ( rx == RX1CM ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def smart_T1_delays(T1_int=90e3, QPT1=1.5e6, half_decay_point=1e6, eff_T1_delay=800.0, probe_point=0.5, meas_per_QPinj=30, meas_per_reptime=5):\r\n# rep_time = 1.0e9/fg.get_frequency()\r\n# T1_QPref = 1/(np.log(2)/eff_T1_delay-1/T1_int) # T1 at half decay point = effective readout delay/ln(2), excluding...
[ "0.5885476", "0.5531798", "0.5509869", "0.5455712", "0.5396025", "0.5358804", "0.5324626", "0.52778035", "0.52580297", "0.524678", "0.5246389", "0.5246389", "0.5226734", "0.5202326", "0.517648", "0.5148508", "0.5135811", "0.5122204", "0.50855315", "0.50445884", "0.50372237", ...
0.5705294
1
Restore delay differences for input antennas and all valid polarization/receiver pairs
def restoreDelayDiff(ants) : failedAnts = [] for ant in ants: try: mp = "Control.Antenna%d.rxDelay3mmPol2"%ant delay = queryDouble(mp) # print "Ant %d, 3mm Pol2 = %f"% (ant,delay) s.delayDifference(delay, ant, RX3MM, POL2) mp = "Control.Antenna...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delaysOff() :\n s.useAdjustableDelay(False,[0])\n s.useGeometricDelay(False,[0])\n s.useHeightDelay(False,[0])\n s.useIonosphericDelay(False,[0])\n s.useThermalDelay(False,[0])\n s.useTroposphericDelay(False,[0])\n adjustableDelay(0,0)\n ants = currentAntennaNumbers()\n for myAnt in ...
[ "0.597963", "0.58097064", "0.57823443", "0.5634378", "0.5532678", "0.54491246", "0.5376783", "0.5242158", "0.5235413", "0.5228991", "0.5219815", "0.518421", "0.5170337", "0.5137552", "0.5082822", "0.50705993", "0.5068182", "0.5063902", "0.5050887", "0.5048269", "0.5024513", ...
0.73007035
0
Set the adjustable delay value for a set of antennas that is added into the total delay for the given antennas. This component of the delay can be turned off on one or more antennas with s.useAdjustableDelay(True/False,ants). The default is to use the adjustable delay value (see boolean values in RTD Delay page). This ...
def adjustableDelay(delay, ants) : antlist = helpers.makeList(ants) s.adjustableDelay(delay, antlist)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delaysOff() :\n s.useAdjustableDelay(False,[0])\n s.useGeometricDelay(False,[0])\n s.useHeightDelay(False,[0])\n s.useIonosphericDelay(False,[0])\n s.useThermalDelay(False,[0])\n s.useTroposphericDelay(False,[0])\n adjustableDelay(0,0)\n ants = currentAntennaNumbers()\n for myAnt in ...
[ "0.64871293", "0.6458717", "0.6106074", "0.59449947", "0.54995054", "0.54088557", "0.5407084", "0.526125", "0.50320905", "0.5029831", "0.50254744", "0.5007341", "0.49470058", "0.49188805", "0.4918149", "0.49073717", "0.4887567", "0.4852145", "0.48053223", "0.47807866", "0.477...
0.7283125
0
Checks the status of ntp on a given host by using the ntpq command and returns a list of strings. The string contents depends on the mode
def checktime(host="all", status=False, verbose=False): if host == "all" : exe = helpers.getCarmaBinaryPath() + "/imrconfig file=" exe += helpers.getCarmaConfPath() + "/imr/carma.xml hosts=true" host = os.popen(exe).read().split() else : host = helpers.makeList(host) for h in host : ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_plugin(work_queue, result_queue):\n while work_queue.qsize():\n host = work_queue.get()\n result = commands.getoutput(plugin_cmd + \" -H \" + host)\n result_queue.put([host, result])", "def check_ping(self, values, hostname):\n try:\n # Different count flags fo...
[ "0.5579265", "0.553914", "0.5501466", "0.54837054", "0.54757905", "0.5407446", "0.5346546", "0.527327", "0.52731895", "0.5226133", "0.5207707", "0.51871634", "0.5113067", "0.51012677", "0.5095502", "0.50781983", "0.50538844", "0.5049802", "0.5034911", "0.5013943", "0.4999676"...
0.59728146
0
Disable alarms on the single or list of monitor points given. See alarmMpenable.
def alarmMpdisable(monitorpoints) : # Make sure every monitor point specified has perfect # capitalization and exists in the monitor system before passing it # along to the SubarrayController and then the FaultSystem m = [] for elem in helpers.makeList(monitorpoints): m.append(helpers.getAb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alarmDisableCorrelator(nums=0):\n\n # support using 0 as a wildcard meaning \"all bands\"\n if nums == 0:\n nums = range(1, 25)\n\n m = [helpers.getAstroBandName(elem) for elem in helpers.makeList(nums)]\n alarmMpdisable(m)", "def alarm1mmdisable() :\n mpName = 'Control.Subarray%d.alarm...
[ "0.681232", "0.6542473", "0.65211004", "0.6393636", "0.6357577", "0.56065863", "0.55554503", "0.5538961", "0.5482572", "0.54681", "0.5466121", "0.5434949", "0.5413762", "0.5413534", "0.53838366", "0.53620887", "0.5342938", "0.5315696", "0.53049976", "0.53049976", "0.5298806",...
0.7866407
0
Disables all of the alarms for the given list of antennas
def alarmDisableAntenna(nums=0): # support using 0 as a wildcard meaning "all antennas" if nums == 0: nums = range(1, 24) m = [] for elem in helpers.makeList(nums): mpname = device.CarmaAnt().getName(elem) + ".online" m.append(mpname) alarmMpdisable(m)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alarmDisableCorrelator(nums=0):\n\n # support using 0 as a wildcard meaning \"all bands\"\n if nums == 0:\n nums = range(1, 25)\n\n m = [helpers.getAstroBandName(elem) for elem in helpers.makeList(nums)]\n alarmMpdisable(m)", "def delaysOff() :\n s.useAdjustableDelay(False,[0])\n s.u...
[ "0.70080674", "0.65165544", "0.6168134", "0.58320415", "0.57978046", "0.5707817", "0.5685381", "0.56815785", "0.5660059", "0.5642928", "0.56328166", "0.5598196", "0.55899614", "0.55811495", "0.5549314", "0.55452377", "0.5532465", "0.5519335", "0.550171", "0.5484702", "0.54145...
0.75215065
0
Enables all of the alarms for the given list of antennas
def alarmEnableAntenna(nums=0): # support using 0 as a wildcard meaning "all antennas" if nums == 0: nums = range(1, 24) m = [] for elem in helpers.makeList(nums): mpname = device.CarmaAnt().getName(elem) + ".online" m.append(mpname) alarmMpenable(m)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alarmEnableCorrelator(nums=0):\n\n # support using 0 as a wildcard meaning \"all bands\"\n if nums == 0:\n nums = range(1, 25)\n\n m = [helpers.getAstroBandName(elem) for elem in helpers.makeList(nums)]\n alarmMpenable(m)", "def enable_all_devices(self, enable_ir_emitter=False):\n p...
[ "0.6845531", "0.64133865", "0.6391112", "0.60407287", "0.5875648", "0.5864438", "0.56395143", "0.562661", "0.55946285", "0.5493207", "0.5477678", "0.5465337", "0.54597205", "0.54189694", "0.5400961", "0.5388757", "0.5379634", "0.5328389", "0.53186923", "0.52824503", "0.526899...
0.7428454
0
Disables all of the alarms for the given list of astrobands
def alarmDisableCorrelator(nums=0): # support using 0 as a wildcard meaning "all bands" if nums == 0: nums = range(1, 25) m = [helpers.getAstroBandName(elem) for elem in helpers.makeList(nums)] alarmMpdisable(m)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alarmDisableAntenna(nums=0):\n\n # support using 0 as a wildcard meaning \"all antennas\"\n if nums == 0:\n nums = range(1, 24)\n\n m = []\n for elem in helpers.makeList(nums):\n mpname = device.CarmaAnt().getName(elem) + \".online\"\n m.append(mpname)\n\n alarmMpdisable(m)"...
[ "0.6409422", "0.5925935", "0.57277566", "0.5691454", "0.56812406", "0.56689644", "0.5668721", "0.56534743", "0.5630497", "0.5592326", "0.55902696", "0.55533427", "0.5547704", "0.55470294", "0.5481088", "0.5452329", "0.54276943", "0.5405963", "0.5386282", "0.5353244", "0.53415...
0.6765459
0
Enables all of the alarms for the given list of astrobands
def alarmEnableCorrelator(nums=0): # support using 0 as a wildcard meaning "all bands" if nums == 0: nums = range(1, 25) m = [helpers.getAstroBandName(elem) for elem in helpers.makeList(nums)] alarmMpenable(m)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alarmEnableAntenna(nums=0):\n\n\n # support using 0 as a wildcard meaning \"all antennas\"\n if nums == 0:\n nums = range(1, 24)\n\n m = []\n for elem in helpers.makeList(nums):\n mpname = device.CarmaAnt().getName(elem) + \".online\"\n m.append(mpname)\n\n alarmMpenable(m)"...
[ "0.6268857", "0.5906696", "0.58543026", "0.5834481", "0.5769095", "0.55856425", "0.5581751", "0.5567398", "0.55054605", "0.5489165", "0.5463807", "0.54512054", "0.5410384", "0.54027396", "0.5397499", "0.5369058", "0.53252", "0.53037274", "0.53035516", "0.52817374", "0.5259184...
0.66952026
0
Restores alarms on the single or list of monitor points given to the state given in the fault system description file, normally /opt/rt/conf/fault/carma.fdagml. See alarmMpdisable
def alarmMpenable(monitorpoints) : # Make sure every monitor point specified has perfect # capitalization and exists in the monitor system before passing it # along to the SubarrayController and then the FaultSystem m = [] for elem in helpers.makeList(monitorpoints): m.append(helpers.getAbs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alarmMpdisable(monitorpoints) :\n\n # Make sure every monitor point specified has perfect\n # capitalization and exists in the monitor system before passing it\n # along to the SubarrayController and then the FaultSystem\n m = []\n for elem in helpers.makeList(monitorpoints):\n m.append(h...
[ "0.69259655", "0.6290939", "0.59830564", "0.5855904", "0.57614386", "0.57420665", "0.5709192", "0.5595338", "0.5551515", "0.5537008", "0.5480304", "0.54577214", "0.5356589", "0.5345179", "0.5321916", "0.52515715", "0.5237127", "0.52040136", "0.5200017", "0.5111715", "0.510101...
0.6607808
1
Disable alarms on the timeSinceLastIntegration MP for requested correlators owned by the requested subarray and max coherence rfor all antennas in the requested subarray.
def alarmIntegdisable(corr=CORR_ALL, subarray=DEFAULT) : if subarray == SCI1: acorrs = assignedCorrelator(1) elif subarray == SCI2: acorrs = assignedCorrelator(2) elif subarray == DEFAULT: acorrs = assignedCorrelator(subarrayNo) elif subarray == BOTH: acorrs = 'SPECTRAL+WIDEBAND' # BOTH ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alarm1mmdisable() :\n mpName = 'Control.Subarray%d.alarm1mm' %subarrayNo\n alarmMpdisable( mpName )", "def alarmDisableCorrelator(nums=0):\n\n # support using 0 as a wildcard meaning \"all bands\"\n if nums == 0:\n nums = range(1, 25)\n\n m = [helpers.getAstroBandName(elem) for elem in ...
[ "0.64889693", "0.62275255", "0.5580281", "0.54534364", "0.5431063", "0.53532785", "0.53320086", "0.52539855", "0.5249335", "0.5233193", "0.5222511", "0.51147294", "0.5089156", "0.50612074", "0.50500363", "0.5029169", "0.49749175", "0.4943007", "0.49200252", "0.48799995", "0.4...
0.66906375
0
Disable alarms due to 1mm observing conditions changing. (Currently the alarm is only triggered for Sci1 subarray)
def alarm1mmdisable() : mpName = 'Control.Subarray%d.alarm1mm' %subarrayNo alarmMpdisable( mpName )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def disable_amplitude_modulation(self):\n self.write(\":SOUR:AM:STAT OFF\")", "def alarmDisableCorrelator(nums=0):\n\n # support using 0 as a wildcard meaning \"all bands\"\n if nums == 0:\n nums = range(1, 25)\n\n m = [helpers.getAstroBandName(elem) for elem in helpers.makeList(nums)]\n ...
[ "0.68457425", "0.66774976", "0.657785", "0.65093523", "0.6379017", "0.6191392", "0.60248584", "0.5977254", "0.59448034", "0.5926941", "0.59202516", "0.58884424", "0.58630365", "0.5823753", "0.57727486", "0.5724848", "0.5712401", "0.57023495", "0.568461", "0.56686896", "0.5663...
0.776501
0
Restore alarms due to 1mm observing conditions changing. (Currently the alarm is only triggered for Sci1 subarray)
def alarm1mmrestore() : mpName = 'Control.Subarray%d.alarm1mm' %subarrayNo alarmMpenable( mpName )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alarm1mmdisable() :\n mpName = 'Control.Subarray%d.alarm1mm' %subarrayNo\n alarmMpdisable( mpName )", "def alarm1mm(state) :\n if (subarrayNo > 2) :\n raise Exception, \"This command is only valid for Science subarrays.\"\n if ( state == ON ) :\n s.alarm1mm( True );\n return;\n...
[ "0.6860847", "0.67102146", "0.6091646", "0.5799249", "0.5766344", "0.5723313", "0.5573839", "0.55675155", "0.5520047", "0.5494476", "0.548724", "0.5483201", "0.5471022", "0.5467034", "0.5425515", "0.5364728", "0.5364022", "0.5356349", "0.5336527", "0.5327811", "0.5323869", ...
0.7756242
0
Controls decimation of data in the pipeline. When data are decimated the lag data are Hann windowed and then Fourier transformed, yielding a doubled channel width, after which every other channel are dropped, giving independent channels. When decimation is turned off there is no Hann windowing and the end channels are ...
def decimation(decimate=False, bandNo=0, keepEndChans=False, subarray=DEFAULT) : if bool != type(decimate) : raise Exception, "Input decimation must be a boolean" DEC_ON = carma.control.DECIMATION_ON DEC_OFF = carma.control.DECIMATION_OFF_DROP_END_CHANNELS KEEP = carma.control.DECIMATION_OF...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_decimate(self, decimate):\n self.vdecimate = max(1, int(decimate))\n self.oneovern = 1./float(self.vdecimate)\n print(\"V_ave decimate : %d\" % (self.vdecimate))", "def decimate(options):\n signal = audio.read(options.ipath)\n result = op.decimate(signal.data, int(options.fac...
[ "0.5641696", "0.5613948", "0.5587949", "0.5487346", "0.5320472", "0.50334257", "0.4939944", "0.48734105", "0.48559016", "0.4849767", "0.4827998", "0.47854456", "0.46948457", "0.46866468", "0.46740153", "0.46694472", "0.46616012", "0.46348116", "0.46150544", "0.4607678", "0.46...
0.6432729
0
An internal routine (not for use by observers) to take a string that may be either a frequency in GHz or a molecular line name. Returns a tuple containing the freq and name. The name is set to 'none' if a numerical value is directly entered.
def _resolveFreq(freq) : err = "The input type(%s) of %s passed to _resolveFreq() is not legitimate" \ %(type(freq), freq) if isinstance(freq, types.BooleanType): raise Exception, err if isinstance(freq, types.FloatType): return (freq, 'none') if isinstance(freq, types.IntType): re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _getFrequency(s, line, text):\n if len(s) > 0 and s[0].isalpha(): \n if s.lower() in _frequency:\n return _frequency[s.lower()]\n else:\n raise ValueError(\"invalid note name/frequency '%s' on line %d: %s\" % (s, line, text))\n else:\n return int(float(s))", "...
[ "0.6051127", "0.56801736", "0.5436816", "0.5278704", "0.52159226", "0.51833004", "0.5181979", "0.5117356", "0.5067157", "0.5056951", "0.50363195", "0.5029335", "0.4983523", "0.49804005", "0.49728605", "0.49442908", "0.49343348", "0.48889667", "0.48885363", "0.48775625", "0.48...
0.5996934
1
Get the frequency for a molecular line transition. The transitions are listed in /opt/rt/conf/catalogs/SpectralLine.cat as aliases near the top of the file. If the transition is not found an exception will be thrown
def linefreq(transition) : return s.lineFreq(transition)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transitionfreq(molecule, transition) :\n return s.transitionFreq(molecule, transition)", "def freq(self):\n a = re.search('(?<=_)[K,C,L,P]{1}(?<!_)', self.fname)\n if a is None:\n raise Exception(\"Can't determine frequency freq from CFX file\")\n else:\n return ...
[ "0.6807826", "0.55847055", "0.5580331", "0.5580331", "0.5447142", "0.54425716", "0.54053503", "0.5368162", "0.5285638", "0.5278724", "0.52709126", "0.52242404", "0.518868", "0.5139172", "0.5085396", "0.5042021", "0.5009059", "0.49957755", "0.49770227", "0.4965733", "0.4929264...
0.7592808
0
Set the SIS junction voltage (Vj) and current (Ij) for the current rx for a specific antenna.
def vjij(Vj, Ij, pol, ant) : s.vj(pol,Vj, ant) sleep(0.5) s.ij(pol,Ij, ant)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_voltage(self, v):\n self.environment.set_voltage(self.neuron_id, v)", "def vj(vj, pol, ant) :\n s.vj(pol, vj, ant)", "def set_voltage(self, v, ch): \n self.write(\"VSET\" + str(ch) + \":\" + str(v) + \"\\n\")", "def set_vibration(self, left_motor, right_motor):\n # Set ...
[ "0.58846146", "0.5681464", "0.54935855", "0.5317738", "0.52763754", "0.52727234", "0.5250078", "0.5194082", "0.51637226", "0.51608175", "0.51038384", "0.509708", "0.50519234", "0.4995676", "0.49925804", "0.49634397", "0.494311", "0.4905229", "0.49012783", "0.4888686", "0.4887...
0.60902566
0
Insert ambient load and remove this will cause a new Tsys value to be calculated by the pipeline. This command blocks until complete. If ifsetup=True then the IF power levels will be setup. This can cause a phase discontinuity because signal phase may be a function of attenuation. This command does not wait for the ant...
def tsys(ifsetup=False, ants=0, ifPowerDelay=5.0, subarray=DEFAULT) : if subarray == BOTH: raise Exception, "Can't do tsys on BOTH subarrays" if type(ifsetup) != bool: print "The first argument is 'ifsetup' and it must be a boolean" print "Here is the help for the tsys command" p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def evaluateIFsetup(ants=0, timerange=3.4, deltat=0.1,\n verbose=False, iniAtten=0) :\n antlist = makeAntList(ants)\n for a in antlist:\n if a < 16:\n print \"SZA antennas only can be used - exiting\"\n return\n tpMP = \"Ifmod.ifTotalPower\"\n attenMP = \"Ifmo...
[ "0.5831758", "0.5155175", "0.49723592", "0.4891679", "0.48897314", "0.48776403", "0.4841229", "0.47771686", "0.4768043", "0.474954", "0.47272143", "0.46948007", "0.46741396", "0.4668151", "0.46655297", "0.46624935", "0.46329755", "0.46182662", "0.4612484", "0.4610604", "0.459...
0.61006695
0
Measures response time for setting IF power in antennas. This is a diagnostic routine for experts. Currently assumes SZA antenna, and will only work for them.
def evaluateIFsetup(ants=0, timerange=3.4, deltat=0.1, verbose=False, iniAtten=0) : antlist = makeAntList(ants) for a in antlist: if a < 16: print "SZA antennas only can be used - exiting" return tpMP = "Ifmod.ifTotalPower" attenMP = "Ifmod.totalAtten" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def antennaResponse(peak, xoff, yoff, fwhm):\n return peak * np.exp(CNST / (fwhm*fwhm) * (xoff*xoff + yoff*yoff))", "def iperf_power_test_func(self):\n # Decode test parameters for the current test\n test_params = self.current_test_name.split('_')\n screen_status = test_params[2][6:]\n ...
[ "0.5616429", "0.5603788", "0.5566827", "0.54679185", "0.5439085", "0.5437393", "0.54219157", "0.53273267", "0.5320634", "0.52832365", "0.5250804", "0.52421886", "0.5227959", "0.5222782", "0.51843435", "0.51642007", "0.5140372", "0.51388854", "0.51178646", "0.5099905", "0.5093...
0.6065524
0
Set the IF switch position. This is an engineering command only to allow backdoor access for testing the MMIC 3mm receiver. It will only work on the 10m antennas.
def setIFswitch(position, IFnum, ant): if (position < 1) or (position > 4): m = "Input switch position (%d) must be between 1 and 4" %position raise Exception, m if (IFnum < 1) or (IFnum > 2): m = "Input IFnum (%d) must be 1 or 2" %IFnum raise Exception, m if (ant < 1) or (an...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_position(self, wl):\r\n # FORCE USING nm\r\n if self._current_units != 'nm':\r\n self.set_units('nm')\r\n\r\n # Combine the one-byte goto command with two-byte wl position\r\n cmd = struct.pack('>B', 16) + struct.pack('>H', int(wl))\r\n self.send(cmd)\r\n\r\n ...
[ "0.60829276", "0.58325624", "0.5825148", "0.5822109", "0.57767504", "0.5594747", "0.55754274", "0.55404943", "0.55354464", "0.552093", "0.55150163", "0.54463065", "0.5441812", "0.5437584", "0.5430955", "0.53782296", "0.5372974", "0.5357467", "0.5352614", "0.533698", "0.532584...
0.69034946
0
Retrieves last subarray drive related commands and associate parameters. If a track and equatorial offset was applied, both are returned in the list. If the last command was a moveAz or moveEl the corresponding elevation or azimuth will be the last one set with either moveAz/El or move. If neither is available the curr...
def driveSetup(): # Retrieve subarray drive commands and determine which was issued last. mpPrefix = "Control.subarray%d.Commands." % Subarray.getSubarrayNo() commandTsNameMap = { track: "Track.timestamp", move: "Move.timestamp", stop: "Stop.timestamp", stow: "Stow.timestam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_last_waypoint_command(self):\n return self._last_waypoint_command", "def get_last_cmd(self):\r\n return self.command_manager.get_last_command()", "def get_command(self, key, *more_keys, **kargs):\n root = self._commands\n acutal_keys = [key] + list(more_keys)\n run_ov...
[ "0.50913256", "0.4846586", "0.4805838", "0.4760179", "0.46786323", "0.4660016", "0.46560156", "0.4627497", "0.45923477", "0.4589623", "0.45583338", "0.45525765", "0.45316213", "0.4515513", "0.4513004", "0.45024642", "0.44965845", "0.4478896", "0.44566745", "0.44388607", "0.44...
0.6824284
0
Return mount pointing constants for input antenna. Note that Bima and Ovro antennas use different mount models. For Ovro antennas a single list of values corresponding to m1m5 will be returned. For Bima a double list of values containing the 10 apc/epc pointing coefficients will be returned.
def pointingSetup( ant ): if device.CarmaAnt().isOvro(ant): mpPrefix = "Control.Ovro%d."%ant mpNames = helpers.prefixStringList( mpPrefix, ovroMountPointingConstants.__argsMpNames__ ) elif device.CarmaAnt().isBima(ant): mpPrefix = "Control.Bima%d."%(ant-6) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _radioPointingSetup( aperture, ants ): \n if aperture == RX1MM:\n apString = \"Aperture1mm\"\n elif aperture == RX3MM:\n apString = \"Aperture3mm\"\n elif aperture == RX1CM:\n apString = \"Aperture1cm\"\n else:\n raise Exception, \"Invalid aperture.\"\n\n ants = m...
[ "0.54337937", "0.54092467", "0.5402195", "0.5395399", "0.53476405", "0.53364927", "0.5331803", "0.5324521", "0.5320382", "0.53113246", "0.5265517", "0.5218262", "0.5175073", "0.5163677", "0.51371783", "0.5107418", "0.5077166", "0.5036253", "0.50009465", "0.49620894", "0.49585...
0.5993734
0
Return the last known input parameters to configastroband for the specified band and corr type. These values are retrieved from the monitor system. We intentionally ignore decimation and keepEndChans.
def corrBandSetup( aband, corrType ): def bandwidthToEnum( bw ): """Convert input numeric bandwidth to a fixed enum.""" # global BW500, BW250, BW125, BW62, BW31, BW8, BW2 bandwidths = { BW500: 500.0, BW250: 500.0/2.0, BW125: 500.0/4.0, BW62: 5...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_parameters(self, quality):\n if (quality.upper() == 'NAV') or (quality.upper() == 'NAVIGATION'):\n return self._sensor_param_dict['navigation'].copy()\n \n elif (quality.upper() == 'TAC') or (quality.upper() == 'TACTICAL'):\n return self._sensor_param_dict['tactic...
[ "0.5489398", "0.527606", "0.52697283", "0.52657616", "0.5187127", "0.51797533", "0.5173468", "0.50213146", "0.5012455", "0.4991621", "0.49721587", "0.4969271", "0.49682182", "0.49616802", "0.49409336", "0.4927554", "0.49254277", "0.49239406", "0.49167928", "0.49113312", "0.49...
0.62387556
0
Convert input numeric bandwidth to a fixed enum.
def bandwidthToEnum( bw ): # global BW500, BW250, BW125, BW62, BW31, BW8, BW2 bandwidths = { BW500: 500.0, BW250: 500.0/2.0, BW125: 500.0/4.0, BW62: 500.0/8.0, BW31: 500.0/16.0, BW8: 500.0/64.0, BW2: 500.0/256.0 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_flowrate(setting):\r\n return 0.8991*setting - 62.339", "def sidebandToEnum( sb ):\n sidebands = {\n 0: USB,\n 1: LSB,\n 2: AUTO \n }\n return sidebands[sb]", "def to_internal_value(self, data: Any) -> int:\n\n if isinstance(data, int)...
[ "0.5833702", "0.57239103", "0.5633915", "0.5570295", "0.5438547", "0.5430306", "0.5374136", "0.5359457", "0.5358449", "0.53471583", "0.52892643", "0.5286754", "0.5270493", "0.5251082", "0.52395296", "0.52367693", "0.5233481", "0.5202685", "0.51982737", "0.51511174", "0.513929...
0.7739317
0
Convert sideband monitor point enum (integer) to a fixed enum.
def sidebandToEnum( sb ): sidebands = { 0: USB, 1: LSB, 2: AUTO } return sidebands[sb]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bandwidthToEnum( bw ):\n # global BW500, BW250, BW125, BW62, BW31, BW8, BW2\n bandwidths = {\n BW500: 500.0,\n BW250: 500.0/2.0,\n BW125: 500.0/4.0,\n BW62: 500.0/8.0,\n BW31: 500.0/16.0,\n BW8: 500.0/64.0,\n BW2: 500.0/...
[ "0.62198603", "0.5727801", "0.57015127", "0.56504935", "0.5449432", "0.5388143", "0.53781813", "0.5348513", "0.53040415", "0.52764255", "0.5216431", "0.52070594", "0.5065606", "0.50310427", "0.50256526", "0.5025311", "0.5024063", "0.50176907", "0.50135195", "0.49478233", "0.4...
0.67240727
0
Convert fpgaMode enum to astroband configuration string.
def fpgaModeToAbConfig(fpga): abconfig= { 0: "LL", 1: "DUALPOL", 2: "FULLSTOKES", 3: "CARMA23", } return abconfig[fpga]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getModeString(self, mode):\n if mode == 0:\n return \"4 MHz\"\n elif mode == 1:\n return \"500 KHz\"\n else:\n raise FliError(\"FLIGetCameraModeString failed\")", "def config_mode(self):\n return \"\"", "def usb_mode() -> str:", "def _format_ar...
[ "0.6648956", "0.6052564", "0.57472855", "0.574614", "0.5593992", "0.5577035", "0.5541889", "0.5521544", "0.53926045", "0.53632474", "0.5330546", "0.53247094", "0.5288215", "0.528598", "0.52559906", "0.52559906", "0.5243009", "0.5243009", "0.5242676", "0.5240095", "0.52142906"...
0.7111766
0