Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 35f01582eb8d3ce57a988a99a7ea0143159e2129 authored by Bryna Hazelton on 22 February 2024, 16:37:13 UTC, committed by Bryna Hazelton on 22 February 2024, 18:38:54 UTC
update the changelog for a new version
1 parent df6b902
  • Files
  • Changes
  • d25fe08
  • /
  • scripts
  • /
  • make_bad_fhd_files.pro
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:35f01582eb8d3ce57a988a99a7ea0143159e2129
directory badge
swh:1:dir:46b3c12a2b16befc19e06d0ebeeae7baeda6e099
content badge
swh:1:cnt:6a3b834e9527951900339b3212c73d4bf62aa6c4

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
make_bad_fhd_files.pro
pro make_bad_fhd_files, good_data_file, good_layout_file, good_flag_file

  ;; obs comes out of the data file, need to mess it up there.
  if n_elements(good_data_file) eq 0 then good_data_file = '1061316296_vis_XX.sav'
  data_root = cgRootName(good_data_file, directory=directory, extension=extension)
  data_start = (strsplit(data_root, 'vis',/extract))[0]
  data_end = 'vis' + (strsplit(data_root, 'vis',/extract))[1]
  bad_data_file = directory + data_start + 'broken_' + data_end + '.' + extension

  restore, good_data_file
  obs.instrument = 'foo'
  obs.n_time = 1
  obs.nbaselines = obs.nbaselines / 2.
  obs.obsra = obs.obsra - 10.

  save, file = bad_data_file, obs, vis_ptr

  bad_obs_loc_data_file = directory + data_start + 'bad_obs_loc_' + data_end + '.' + extension
  restore, good_data_file

  obs.lat = obs.lat + 10
  obs.lon = obs.lon + 10

  nants = n_elements((*obs.baseline_info).tile_names)
  (*obs.baseline_info).tile_names = string(indgen(nants))

  save, file = bad_obs_loc_data_file, obs, vis_ptr


  if n_elements(good_layout_file) eq 0 then good_layout_file = '1061316296_layout.sav'
  layout_root = cgRootName(good_layout_file, directory=directory, extension=extension)
  layout_start = (strsplit(layout_root, 'layout',/extract))[0]
  layout_end = 'layout'
  bad_layout_file = directory + layout_start + 'broken_' + layout_end + '.' + extension

  restore, good_layout_file

  layout.coordinate_frame = '????'

  nants = n_elements(layout.antenna_names)
  layout = create_struct(layout, 'diameters', fltarr(nants) + 5.)

  layout = create_struct(layout, 'foo', 'bar')

  save, file = bad_layout_file, layout

  good_arr_center_layout_file = directory + layout_start + 'fixed_arr_center_' + layout_end + '.' + extension
  restore, good_layout_file

  layout.array_center = [-2559454.07880307d,  5095372.14368305d, -2849057.18534633d]
  save, file = good_arr_center_layout_file, layout


  if n_elements(good_flag_file) eq 0 then good_flag_file = '1061316296_flags.sav'
  flag_root = cgRootName(good_flag_file, directory=directory, extension=extension)
  flag_start = (strsplit(layout_root, 'flags',/extract))[0]
  flag_end = 'flags'
  variant_flag_file = directory + flag_start + 'variant_' + flag_end + '.' + extension
  bad_flag_file = directory + flag_start + 'broken_' + flag_end + '.' + extension

  restore, good_flag_file

  vis_weights = flag_arr
  save, file = variant_flag_file, vis_weights

  foo = ''
  save, file = bad_flag_file, foo

end
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API